import { ShopHonorManageComponent } from './../../coms/shop-honor-manage/shop-honor-manage.component';
import { AiSearchHeaderTagComponent } from './../../coms/ai-search-header-tag/ai-search-header-tag.component';
import { ListOfHousePlansComponent } from './../../coms/list-of-house-plans/list-of-house-plans.component';
import { FreeCollectionOfDesignComponent } from './../../free-collection-of-design/free-collection-of-design.component';
import { SecondKillContentComponent } from './../../coms/second-kill-content/second-kill-content.component';
import { ClassificationComponent } from './../../coms/classification/classification.component';
import { DecorateInfoListComponent } from './../../coms/decorate-info-list/decorate-info-list.component';
import { SendSingleComponent } from './../../coms/send-single/send-single.component';
import { ShoppingCarComponent } from './../../coms/shopping-car/shopping-car.component';
import { SlideLocationComponent } from './../../coms/slide-location/slide-location.component';
import { CompanyInfoComponent } from './../../coms/company-info/company-info.component';
import { AuditListComponent } from './../../coms/audit-list/audit-list.component';
// tslint:disable
import { AdvertiseComponent } from './../../coms/advertise/advertise.component';
import { PerformanceDetailHeaderComponent } from './../../performance-detail-header/performance-detail-header.component';
import { AdviserInfoComponent } from './../../coms/adviser-info/adviser-info.component';
import { Injectable, NgZone, ElementRef, ViewChild } from '@angular/core';
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { ModalController } from '@ionic/angular';
import { Platform } from '@ionic/angular';
import { RankingComponent } from 'src/app/coms/ranking/ranking.component';

import { element } from 'protractor';

import { ToAppComponent } from 'src/app/coms/to-app/to-app.component';
import { filter } from 'rxjs/operators';
import { RemarksComponent } from 'src/app/coms/remarks/remarks.component';
import { LineComponent } from 'src/app/coms/line/line.component';
import { TipsComponent } from 'src/app/coms/tips/tips.component';
import { ComItem } from 'src/app/route/entry/com-item';
import { CaseComponent } from 'src/app/coms/case/case.component';
import { SiftComponent } from 'src/app/coms/sift/sift.component';
import { MineComponent } from 'src/app/coms/mine/mine.component';
import { CallComponent } from 'src/app/coms/call/call.component';
import { DetailComponent } from 'src/app/coms/detail/detail.component';
import { VideoComponent } from 'src/app/coms/video/video.component';
import { TitleComponent } from 'src/app/coms/title/title.component';
import { LoginComponent } from 'src/app/coms/login/login.component';
import { BrandComponent } from 'src/app/coms/brand/brand.component';
import { VoiceComponent } from 'src/app/coms/voice/voice.component';
import { TopTabComponent } from 'src/app/coms/top-tab/top-tab.component';
import { PosterComponent } from 'src/app/coms/poster/poster.component';
import { ChooseCityComponent } from 'src/app/coms/choose-city/choose-city.component';
import { RegisterComponent } from 'src/app/coms/register/register.component';
import { TopTipsComponent } from 'src/app/coms/top-tips/top-tips.component';
import { SettingsPage } from 'src/app/coms/settings-page/settings.page';
import { AboutUsPage } from 'src/app/coms/settings-page/about-us.page';
import { ChooseTypeComponent } from 'src/app/coms/choose-type/choose-type.component';
import { CounselorComponent } from 'src/app/coms/counselor/counselor.component';
import { NewsListComponent } from 'src/app/coms/news-list/news-list.component';
import { LogoCallComponent } from 'src/app/coms/logo-call/logo-call.component';
import { ShowListComponent } from 'src/app/coms/show-list/show-list.component';
import { MineListComponent } from 'src/app/coms/mine-list/mine-list.component';
import { FixedTabComponent } from 'src/app/coms/fixed-tab/fixed-tab.component';
import { IconLinkComponent } from 'src/app/coms/icon-link/icon-link.component';
import { JobManagerComponent } from 'src/app/coms/job-manager/job-manager.component';
import { ButtonNavComponent } from 'src/app/coms/button-nav/button-nav.component';
import { ButtonNavOneComponent } from 'src/app/coms/button-nav-one/button-nav-one.component';
import { ButtonNavTwoComponent } from 'src/app/coms/button-nav-two/button-nav-two.component';
import { ButtonNavThreeComponent } from 'src/app/coms/button-nav-three/button-nav-three.component';
import { ButtonNavFourComponent } from 'src/app/coms/button-nav-four/button-nav-four.component';
import { ButtonNavFiveComponent } from 'src/app/coms/button-nav-five/button-nav-five.component';
import { ButtonNavDefaultComponent } from 'src/app/coms/button-nav-default/button-nav-default.component';
import { ChangePwdComponent } from 'src/app/coms/change-pwd/change-pwd.component';
import { SignOfferComponent } from 'src/app/coms/sign-offer/sign-offer.component';
import { ZoologySystemComponent } from 'src/app/coms/zoology-system/zoology-system.component';
import { OptimizationBrandComponent } from 'src/app/coms/optimization-brand/optimization-brand.component';
import { BrandListComponent } from 'src/app/coms/brand-list/brand-list.component';
import { PublishTitleComponent } from 'src/app/coms/publish-title/publish-title.component';
import { RecommendMessageComponent } from 'src/app/coms/recommend-message/recommend-message.component';
import { InvestmentListComponent } from 'src/app/coms/investment-list/investment-list.component';
import { OpenMemberComponent } from 'src/app/coms/open-member/open-member.component';
import { AttractListComponent } from 'src/app/coms/attract-list/attract-list.component';
import { ContractOffComponent } from 'src/app/coms/contract-off/contract-off.component';
import { ColumnTagComponent } from 'src/app/coms/column-tag/column-tag.component';
import { BIconLinkComponent } from 'src/app/coms/bIcon-link/bIcon-link.component';
import { BlockLinkComponent } from 'src/app/coms/block-link/block-link.component';
import { StoreListComponent } from 'src/app/coms/store-list/store-list.component';
import { PromptMapComponent } from 'src/app/coms/prompt-map/prompt-map.component';
import { BasicListComponent } from 'src/app/coms/basic-list/basic-list.component';
import { WaySkillsComponent } from 'src/app/coms/way-skills/way-skills.component';
import { QuoteInfoComponent } from 'src/app/coms/quote-info/quote-info.component';
import { VerifyListComponent } from 'src/app/coms/verify-list/verify-list.component';
import { ButtonHeapComponent } from 'src/app/coms/button-heap/button-heap.component';
import { InnerTitleComponent } from 'src/app/coms/inner-title/inner-title.component';
import { SiftFilterComponent } from 'src/app/coms/sift-filter/sift-filter.component';
import { MoreButtonComponent } from 'src/app/coms/more-button/more-button.component';
import { DetailListComponent } from 'src/app/coms/detail-list/detail-list.component';
import { PosterCallComponent } from 'src/app/coms/poster-call/poster-call.component';
import { FooterLogoComponent } from 'src/app/coms/footer-logo/footer-logo.component';
import { BiconLinksComponent } from 'src/app/coms/bicon-links/bicon-links.component';
import { AddressMapComponent } from 'src/app/coms/address-map/address-map.component';
import { ManagevideoComponent } from 'src/app/coms/managevideo/managevideo.component';
import { CaseRemarkComponent } from 'src/app/coms/case-remark/case-remark.component';
import { BrowsingVolumeComponent } from 'src/app/coms/browsing-volume/browsing-volume.component';
import { TransferDetailComponent } from 'src/app/coms/transfer-detail/transfer-detail.component';
import { ArticleListComponent } from 'src/app/coms/article-list/article-list.component';
import { SearchInputComponent } from 'src/app/coms/search-input/search-input.component';
import { BranchSheetComponent } from 'src/app/coms/branch-sheet/branch-sheet.component';
import { ExampleListComponent } from 'src/app/coms/example-list/example-list.component';
import { ProjectListComponent } from 'src/app/coms/project-list/project-list.component';
import { RentCompareComponent } from 'src/app/coms/rent-compare/rent-compare.component';
import { HorizontalListComponent } from 'src/app/coms/horizontal-list/horizontal-list.component';
import { MemberStatusComponent } from 'src/app/coms/member-status/member-status.component';
import { SearchFilterComponent } from 'src/app/coms/search-filter/search-filter.component';
import { SlidesImgageComponent } from 'src/app/coms/slides-imgage/slides-imgage.component';
import { NewsCarouselComponent } from 'src/app/coms/news-carousel/news-carousel.component';
import { ServiceBriefComponent } from 'src/app/coms/service-brief/service-brief.component';
import { ConsultantListComponent } from 'src/app/coms/consultant-list/consultant-list.component';
import { RecommendListComponent } from 'src/app/coms/recommend-list/recommend-list.component';
import { RecommendDatumComponent } from 'src/app/coms/recommend-datum/recommend-datum.component';
import { OperationalHelpComponent } from 'src/app/coms/operational-help/operational-help.component';
import { TiptitleComponent } from 'src/app/coms/tiptitle/tiptitle.component';
import { FilterRecommendListComponent } from 'src/app/coms/filter-recommend-list/filter-recommend-list.component';
import { PostAndEitorComponent } from 'src/app/coms/post-and-eitor/post-and-eitor.component';
import { AdvertisePlayComponent } from 'src/app/coms/advertise-play/advertise-play.component';
import { AnalysisChartComponent } from 'src/app/coms/analysis-chart/analysis-chart.component';
import { CounselorListComponent } from 'src/app/coms/counselor-list/counselor-list.component';
import { CustomerSourceComponent } from 'src/app/coms/customer-source/customer-source.component';
import { FooterProtocolComponent } from 'src/app/coms/footer-protocol/footer-protocol.component';
import { PeripheralInfoComponent } from 'src/app/coms/peripheral-info/peripheral-info.component';
import { ProgressBarComponent } from 'src/app/coms/progress-bar/progress-bar.component';
import { ProtocolTemplateComponent } from 'src/app/coms/protocol-template/protocol-template.component';
import { LastContactListComponent } from 'src/app/coms/last-contact-list/last-contact-list.component';
import { QuotationRemarkComponent } from 'src/app/coms/quotation-remark/quotation-remark.component';
import { IndustryAnalysisComponent } from 'src/app/coms/industry-analysis/industry-analysis.component';
import { PyCustomerListComponent } from 'src/app/coms/py-customer-list/py-customer-list.component';
import { CustomerServiceComponent } from 'src/app/coms/customer-service/customer-service.component';
import { StoreConsultantComponent } from 'src/app/coms/store-consultant/store-consultant.component';
import { InformationHallComponent } from 'src/app/coms/information-hall/information-hall.component';
import { BusinessSummaryComponent } from 'src/app/coms/business-summary/business-summary.component';
import { BackgroundStyleComponent } from 'src/app/coms/background-style/background-style.component';
import { HelpTransferSitingComponent } from 'src/app/coms/help-transfer-siting/help-transfer-siting.component';
import { PresalesInformationComponent } from 'src/app/coms/presales-information/presales-information.component';
import { ExtendPictureComponent } from 'src/app/coms/extend-picture/extend-picture.component';
import { ExclusiveConsultantComponent } from 'src/app/coms/exclusive-consultant/exclusive-consultant.component';
import { InvitationToShopComponent } from 'src/app/coms/invitation-to-shop/invitation-to-shop.component';
import { CustomerEvaluationComponent } from 'src/app/coms/customer-evaluation/customer-evaluation.component';
import { ServiceEvaluationComponent } from 'src/app/coms/service-evaluation/service-evaluation.component';
import { MyAchievementChartComponent } from 'src/app/coms/my-achievement-chart/my-achievement-chart.component';
import { PromotionRecordListComponent } from 'src/app/coms/promotion-record-list/promotion-record-list.component';
import { ServiceQuoteSalesmanComponent } from 'src/app/coms/service-quote-salesman/service-quote-salesman.component';
import { PromotionOfStatisticsComponent } from 'src/app/coms/promotion-of-statistics/promotion-of-statistics.component';
import { CommonSubmitBtnComponent } from 'src/app/coms/post-edit-form/common-submit-btn/common-submit-btn.component';
import { ServiceAgreementCheckedComponent } from 'src/app/coms/service-agreement-checked/service-agreement-checked.component';
import { CopyToPasteBtnComponent } from 'src/app/coms/copy-to-paste-btn/copy-to-paste-btn.component';
import { DepartmentIntroductionComponent } from 'src/app/coms/department-introduction/department-introduction.component';
import { DepartmentEmployeeComponent } from 'src/app/coms/department-employee/department-employee.component';
import { BusinessCityComponent } from 'src/app/coms/business-city/business-city.component';
import { DeptManagerComponent } from 'src/app/coms/dept-manager/dept-manager.component';
import { EmployeeManagerComponent } from 'src/app/coms/employee-manager/employee-manager.component';
import { ContractListFilterComponent } from 'src/app/coms/contract-list-filter/contract-list-filter.component';
import { ContractAuditDetailComponent } from 'src/app/coms/contract-audit-detail/contract-audit-detail.component';
import { DecorationCompaniesComponent } from 'src/app/coms/decoration-companies/decoration-companies.component';
import { CompaniesCredentialComponent } from 'src/app/coms/companies-credential/companies-credential.component';
import { ChooseDepartmentComponent } from 'src/app/coms/choose-department/choose-department.component';
import { AllAddressTagComponent } from 'src/app/coms/all-address-tag/all-address-tag.component';
import { PublishSiteTypeComponent } from 'src/app/coms/publish-site-type/publish-site-type.component';
import { CustomSearchBarComponent } from 'src/app/custom-search-bar/custom-search-bar.component';
import { DataMapEntryComponent } from 'src/app/coms/data-map-entry/data-map-entry.component';
import { ListValueShowComponent } from 'src/app/coms/list-value-show/list-value-show.component';
import { SigningOnComponent } from 'src/app/coms/signing-on/signing-on.component';
import { CustomerDetailsComponent } from 'src/app/coms/customer-details/customer-details.component';
import { ServiceModuleComponent } from 'src/app/coms/service-module/service-module.component';
import { ManageBusinessServiceComponent } from 'src/app/coms/manage-business-service/manage-business-service.component';
import { WorkCenterComponent } from 'src/app/coms/work-center/work-center.component';
import { RegisteredListComponent } from 'src/app/coms/registered-list/registered-list.component';
import { CaseListComponent } from 'src/app/coms/case-list/case-list.component';
import { SpinComponent } from 'src/app/coms/spin/spin.component';
import { AchievementComponent } from 'src/app/coms/achievement/achievement.component';
import { OpportunityListComponent } from 'src/app/coms/opportunity-list/opportunity-list.component';
import { RecommendRecordListComponent } from 'src/app/coms/recommend-record-list/recommend-record-list.component';
import { RecommendChooseComponent } from 'src/app/coms/recommend-choose/recommend-choose.component';
import { RecommandQueryComponent } from 'src/app/coms/recommand-query/recommand-query.component';
import { PresalesBusinessOptComponent } from 'src/app/coms/presales-business-opt/presales-business-opt.component';
import { InformationCardComponent } from 'src/app/coms/information-card/information-card.component';
import { RecommandByCustomerComponent } from 'src/app/coms/recommand-by-customer/recommand-by-customer.component';
import { RecommendDetailComponent } from 'src/app/coms/recommend-detail/recommend-detail.component';
import { RecommandInfoComponent } from 'src/app/coms/recommand-info/recommand-info.component';
import { CaseRecommedListComponent } from 'src/app/coms/case-recommed-list/case-recommed-list.component';
import { AppGeneralListComponent } from 'src/app/coms/app-general-list/app-general-list.component';
import { RecommendInformationListComponent } from 'src/app/coms/recommend-information-list/recommend-information-list.component';
import { StatisticsCustomerIntentionComponent } from 'src/app/coms/statistics-customer-intention/statistics-customer-intention.component';

import { AcceptRecommendComponent } from './../../coms/accept-recommend/accept-recommend.component';
import { ChatInviteComponent } from '../../coms/chat-invite/chat-invite.component';
import { CommonBtnComponent } from './../../coms/common-btn/common-btn.component';
import { CustomPhoneComponent } from '../../coms/custom-phone/custom-phone.component';
import { DecorateListComponent } from '../../coms/decorate-list/decorate-list.component';
import { DecorationBannerComponent } from '../../coms/decoration-banner/decoration-banner.component';
import { DecorationOffComponent } from '../../coms/decoration-off/decoration-off.component';
import { FinishcompanyListComponent } from '../../coms/finishcompany-list/finishcompany-list.component';
import { InformationEntryComponent } from '../../coms/information-entry/information-entry.component';
import { MembershipServiceComponent } from '../../coms/membership-service/membership-service.component';
import { MerchantListComponent } from '../../coms/merchant-list/merchant-list.component';
import { OnlineOffComponent } from '../../coms/online-off/online-off.component';
import { PaySuccessComponent } from './../../coms/pay-success/pay-success.component';
import { PayWayComponent } from './../../coms/pay-way/pay-way.component';
import { PostEditFormComponent } from './../../coms/post-edit-form/post-edit-form.component';
import { QrcodeComponent } from './../../coms/qrcode/qrcode.component';
import { RecommendChooseAllComponent } from './../../coms/recommend-choose-all/recommend-choose-all.component';
import { RecommendClienteleComponent } from '../../coms/recommend-clientele/recommend-clientele.component';
import { RecommendClientlistComponent } from '../../coms/recommend-clientlist/recommend-clientlist.component';
import { RecommendDataComponent } from '../../coms/recommend-data/recommend-data.component';
import { ServiceDetailsComponent } from '../../coms/service-details/service-details.component';
import { ServiceQuoteComponent } from './../../coms/service-quote/service-quote.component';
import { SubmitFormComponent } from '../../coms/submit-form/submit-form.component';
import { SuccessInvestmentComponent } from '../../coms/success-investment/success-investment.component';
import { SystemNewsComponent } from '../../coms/system-news/system-news.component';
import { SigningPayComponent } from './../../coms/signing-on/signing-pay/signing-pay.component';

import { AppGlobalService } from './app-global.service';
import { EventService } from './event.service';
import { HttpService } from './http.service';
import { MapBaiduService } from './map.baiduapi';
import { OtherServiceListComponent } from 'src/app/coms/other-service-list/other-service-list.component';
import { GeneralHeadCountShopComponent } from 'src/app/coms/general-head-count-shop/general-head-count-shop.component';
import { RecommendServiceListComponent } from 'src/app/coms/recommend-service-list/recommend-service-list.component';
import { MobilePhoneVerificationComponent } from 'src/app/coms/mobile-phone-verification/mobile-phone-verification.component';
import { RecommendTotalComponent } from 'src/app/coms/recommend-total/recommend-total.component';
import { PerformanceDetailListComponent } from 'src/app/performance-detail-list/performance-detail-list.component';
import { MyBiconLinksStyleComponent } from 'src/app/coms/my-bicon-links-style/my-bicon-links-style.component';
import { PersonSignComponent } from 'src/app/coms/person-sign/person-sign.component';
import { PerformanceTotalComponent } from 'src/app/coms/performance-total/performance-total.component';
import { TwoLinkStyleComponent } from 'src/app/coms/two-link-style/two-link-style.component';
import { PosterSharingComponent } from 'src/app/coms/poster-sharing/poster-sharing.component';
import { ApplyToOpenShopComponent } from 'src/app/coms/apply-to-open-shop/apply-to-open-shop.component';
import { LaiJianAchievementComponent } from 'src/app/coms/lai-jian-achievement/lai-jian-achievement.component';
import { LaijianLoginTagComponent } from 'src/app/coms/laijian-login-tag/laijian-login-tag.component';
import { LaijianShopPosterinfoComponent } from 'src/app/coms/laijian-shop-posterinfo/laijian-shop-posterinfo.component';
import { RecommandBannerComponent } from 'src/app/coms/recommand-banner/recommand-banner.component';
import { SimpleTipsTagComponent } from 'src/app/coms/simple-tips-tag/simple-tips-tag.component';
import { SimpleIconTipsTagComponent } from 'src/app/coms/simple-icon-tips-tag/simple-icon-tips-tag.component';
import { NewIndexHeadTagComponent } from 'src/app/coms/new-index-head-tag/new-index-head-tag.component';
import { VerticalImageListComponent } from 'src/app/coms/vertical-image-list/vertical-image-list.component';
import { AppGeneralListLjComponent } from 'src/app/coms/app-general-list-lj/app-general-list-lj.component';
import { ServiceQuoteLjComponent } from 'src/app/coms/service-quote/service-quote-lj/service-quote-lj.component';
import { OpenMemberInvitationModalComponent } from 'src/app/coms/open-member-invitation-modal/open-member-invitation-modal.component';
import { FengWoMessageComponent } from 'src/app/coms/feng-wo-message/feng-wo-message.component';
import { FengWoChatComponent } from 'src/app/coms/feng-wo-chat/feng-wo-chat.component';
import { ApplicationAdminListComponent } from 'src/app/coms/application-admin-list/application-admin-list.component';
import { AdminUserListComponent } from 'src/app/coms/admin-user-list/admin-user-list.component';
import { TabsNgZorroMobileComponent } from 'src/app/coms/tabs-ng-zorro-mobile/tabs-ng-zorro-mobile.component';
import { DataMapComponent } from 'src/app/coms/data-map/data-map.component';
import { VideoImageComponent } from 'src/app/coms/video-image/video-image.component';
import { InfoAuditListComponent } from 'src/app/coms/info-audit-list/info-audit-list.component';
import { AuditSubmitChooseComponent } from 'src/app/coms/audit-submit-choose/audit-submit-choose.component';
import { SingleManageListComponent } from 'src/app/coms/single-manage-list/single-manage-list.component';
import { CardListTagComponent } from 'src/app/coms/card-list-tag/card-list-tag.component';
import { EmployeListComponent } from 'src/app/coms/employe-list/employe-list.component';
import { SmoothStyleButtonComponent } from 'src/app/coms/smooth-style-button/smooth-style-button.component';
import { ParamListComponent } from 'src/app/coms/param-list/param-list.component';
import { RecommendConsultantComponent } from 'src/app/coms/recommend-consultant/recommend-consultant.component';
import { CommentsListComponent } from 'src/app/coms/comments-list/comments-list.component';
import { ServiceStatusComponent } from 'src/app/coms/service-status/service-status.component';
import { HouseCaseManagementComponent } from 'src/app/coms/house-case-management/house-case-management.component';
import { InfoCompanyStyleComponent } from 'src/app/coms/info-company-style/info-company-style.component';
import { SwitchBlockButtonComponent } from 'src/app/coms/switch-block-button/switch-block-button.component';
import { MyApplyListComponent } from 'src/app/coms/my-apply-list/my-apply-list.component';
import { OrderListComponent } from 'src/app/coms/order-list/order-list.component';
import { PerformanceInfoListComponent } from 'src/app/coms/performance-info-list/performance-info-list.component';
import { OrderInfoListComponent } from 'src/app/coms/order-info-list/order-info-list.component';
import { OrderListStyle2Component } from 'src/app/coms/order-list-style2/order-list-style2.component';
import { AddressListComponent } from 'src/app/coms/address-list/address-list.component';
import { SelectSpecificationsComponent } from 'src/app/coms/select-specifications/select-specifications.component';
import { ServiceListComponent } from 'src/app/coms/service-list/service-list.component';
import { TransverseListComponent } from 'src/app/coms/transverse-list/transverse-list.component';
import { ShopAddressListComponent } from 'src/app/coms/shop-address-list/shop-address-list.component';
import { SecondKillListComponent } from 'src/app/coms/second-kill-list/second-kill-list.component';
import { CleanPageComponent } from 'src/app/coms/clean-page/clean-page.component';
import { FilterTransverseTagComponent } from 'src/app/coms/filter-transverse-tag/filter-transverse-tag.component';
import { AdminOppUserListComponent } from 'src/app/coms/admin-opp-user-list/admin-opp-user-list.component';
import { AiDesignListComponent } from 'src/app/coms/ai-design-list/ai-design-list.component';
import { HouseTransverseListComponent } from 'src/app/coms/house-transverse-list/house-transverse-list.component';
import { HouseShowImageComponent } from 'src/app/coms/house-show-image/house-show-image.component';
import { DesignPatternComponent } from 'src/app/coms/design-pattern/design-pattern.component';
import { MyDiyListComponent } from 'src/app/coms/my-diy-list/my-diy-list.component';
import { OneClickLoginComponent } from 'src/app/coms/one-click-login/one-click-login.component';
import { ImgLinkBtnComponent } from 'src/app/coms/img-link-btn/img-link-btn.component';
import { ShopInfoIntegrityComponent } from 'src/app/coms/shop-info-integrity/shop-info-integrity.component';
import { FingerPrintAuthComponent } from 'src/app/coms/finger-print-auth/finger-print-auth.component';
import { ShopGoodsManageListComponent } from 'src/app/coms/shop-goods-manage-list/shop-goods-manage-list.component';
import { VideosComponent } from 'src/app/coms/videos/videos.component';
import { CustomPriceComponent } from 'src/app/coms/custom-price/custom-price.component';
import { CaseTopListComponent } from 'src/app/coms/case-top-list/case-top-list.component';
import { DailyCleanListComponent } from 'src/app/coms/daily-clean-list/daily-clean-list.component';
import { QuotedPriceListComponent } from 'src/app/coms/quoted-price-list/quoted-price-list.component';
import { AppComboListComponent } from 'src/app/coms/app-combo-list/app-combo-list.component';
import { ModifyCustomerOrderComponent } from 'src/app/coms/modify-customer-order/modify-customer-order.component';
import { InvoiceListComponent } from 'src/app/coms/invoice-list/invoice-list.component';
import { LogisticsInfoComponent } from 'src/app/coms/logistics-info/logistics-info.component';
import { RefundDestinationComponent } from 'src/app/coms/refund-destination/refund-destination.component';
import { InvoiceHeadListComponent } from 'src/app/coms/invoice-head-list/invoice-head-list.component';
import { ServiceCaseListComponent } from 'src/app/coms/service-case-list/service-case-list.component';
import { WorksListComponent } from 'src/app/coms/works-list/works-list.component';
import { DesignsRecordListComponent } from 'src/app/coms/designs-record-list/designs-record-list.component';
import { DesignsDataListComponent } from 'src/app/coms/designs-data-list/designs-data-list.component';
import { LogisticsInfoListComponent } from 'src/app/coms/logistics-info-list/logistics-info-list.component';
import { OrderTimeFilterComponent } from 'src/app/coms/order-time-filter/order-time-filter.component';
import { StatisticSalesComponent } from 'src/app/coms/statistic-sales/statistic-sales.component';
import { ComputeReportComponent } from 'src/app/coms/compute-report/compute-report.component';
import { PerformanceDetailsChartComponent } from 'src/app/coms/performance-details-chart/performance-details-chart.component';
import { NewCardListTagComponent } from 'src/app/coms/new-card-list-tag/new-card-list-tag.component';
import { DynamicDetailsComponent } from 'src/app/coms/dynamic-details/dynamic-details.component';
import { SendLabeComponent } from 'src/app/coms/send-label/send-label.component';
import { DynamicDetailsFootComponent } from 'src/app/coms/dynamic-details-foot/dynamic-details-foot.component';
import { DesignatedOrderReceiverComponent } from 'src/app/coms/designated-order-receiver/designated-order-receiver.component';
import { NewChooseCityComponent } from 'src/app/coms/new-choose-city/new-choose-city.component';
import { BusinessOrderComponent } from 'src/app/coms/business-order/business-order.component';
import { NearbyStoresListComponent } from 'src/app/coms/nearby-stores-list/nearby-stores-list.component';
import { CertificateListComponent } from 'src/app/coms/certificate-list/certificate-list.component';
import { LogisticsTrajectoryComponent } from 'src/app/coms/logistics-trajectory/logistics-trajectory.component';
import { FoldListComponent } from 'src/app/coms/fold-list/fold-list.component';
import { videoCommentsDetailsComponent } from 'src/app/coms/video-comments-details/video-comments-details.component';
import { VideoCommentsFootComponent } from 'src/app/coms/video-comments-foot/video-comments-foot.component';
@Injectable({
    providedIn: 'root'
})
export class TabsService {
    @ViewChild('superCotainer') scrollContent: ElementRef;
    headerComs: ComItem[];
    coms: ComItem[];
    subComs: ComItem[];
    footerComs: ComItem[];
    titleBar: any;
    isGrayBg = false; // 默认背景为白色
    backgroundImg: string; // 头部背景图片
    showWaterImg = false;
    pageData: any;
    showTabBarPages = [
        '',
        'tab1',
        'tab2',
        'tab3',
        'tab4',
        'tab5',
    ];
    shouldShow: boolean = true;
    tabPage: any = "tab1";
    navPage = 0;
    // 特定参数页面显示 用不上
    routeParamPages: string[] = [
        'product-details',
    ];

    constructor(
        private router: Router,
        private platform: Platform,
        public eventService: EventService,
        private httpService: HttpService,
        private appGlobalService: AppGlobalService,
        private mapBaiduService: MapBaiduService,
        private modalController: ModalController,
        private ngZone: NgZone,
    ) {
        this.headerComs = [];
        this.platform.ready().then(() => {
            console.log('Tabs service init');
            this.navEvents();
        });
        // for session time out to reload current page
        this.eventService.eventEmit.on('reloadCurrentPage', res => {
            console.log('reloadCurrentPage-eventEmit.on-------->\n');
            this.reloadCurrentPage();
        });
        this.eventService.eventEmit.on('backLastPage', res => {
            console.log('backLastPage-eventEmit.on-------->\n');
            if (!this.shouldShow) {
                this.appGlobalService.goBack();
                if (localStorage.getItem('needRefresh') !== 'true') {
                    this.appGlobalService.popTarget();
                }
            } else {
            }
        });
        this.eventService.eventEmit.on("sendPageData", res => {



            this.getPageData(res, pageData => {
                this.eventService.eventEmit.emit("getPageData" + res['tagOrder'], pageData);
            });


        });
        if (this.eventService.eventEmit.listenerCount('refreshGrayBg') > 0) {
            this.eventService.eventEmit.removeListener('refreshGrayBg');
        }
        this.eventService.eventEmit.on("refreshGrayBg", () => {
            this.refreshContainerBg();
        });

        if (this.eventService.eventEmit.listenerCount('generatedComItem') > 0) {
            this.eventService.eventEmit.removeListener('generatedComItem');
        }
        this.eventService.eventEmit.on('generatedComItem', () => {
            if (localStorage.getItem('generatedComItemTag')) {
                const reqTag = JSON.parse(localStorage.getItem('generatedComItemTag'));
                localStorage.removeItem('generatedComItemTag');
                this.getComsDataByStyle(reqTag.style, data => {
                    localStorage.setItem(reqTag.receiverTag + 'Tag', '1');
                    this.eventService.eventEmit.emit(reqTag.receiverTag, data);
                }, reqTag.tag);
            }
        });

        if (this.eventService.eventEmit.listenerCount('generatedComItemWithBuffer') > 0) {
            this.eventService.eventEmit.removeListener('generatedComItemWithBuffer');
        }
        this.eventService.eventEmit.on('generatedComItemWithBuffer', () => {
            if (localStorage.getItem('generatedComItemWithBufferTag')) {
                const reqTag = JSON.parse(localStorage.getItem('generatedComItemWithBufferTag'));
                localStorage.removeItem('generatedComItemWithBufferTag');
                this.getPageDataWithBuffer(reqTag.data, data => {
                    localStorage.setItem(reqTag.receiverTag + 'Tag', '1');
                    this.eventService.eventEmit.emit(reqTag.receiverTag, data);
                });
            }
        });
    }

    refreshContainerBg() {
        const grayBg = localStorage.getItem('refreshGrayBgTag');
        if (grayBg != null) {
            localStorage.removeItem('refreshGrayBgTag');
            this.isGrayBg = grayBg === 'true' ? true : false;
            this.immediatelyUpdateBg(grayBg === 'true');
        }
    }

    // 获取当前tab并刷新当前tab里面的ion-content的背景颜色
    immediatelyUpdateBg(trueOrFalse) {
        const ionRouterOutlet = document.getElementsByTagName('ion-router-outlet');
        if (ionRouterOutlet && ionRouterOutlet[1]) {
            try {
                const tabTtmlCollection = ionRouterOutlet[1];
                const len = tabTtmlCollection.children.length;
                for (let i = 0; i < len; i++) {
                    const tempTabObj = tabTtmlCollection.children[i];
                    if (!tempTabObj.classList.contains('ion-page-hidden')) {
                        tempTabObj.children[1].setAttribute('class', trueOrFalse ? 'ios hydrated gray-bg' : 'ios hydrated white-bg');
                        break;
                    }
                }
            } catch (e) {
            }
        }
    }


    public hideTabs() {
        const tabBar = document.getElementById('myTabBar');
        if (tabBar) {
            if (tabBar.style.display !== 'none') {
                tabBar.style.display = 'none';
            }
        }
    }

    public showTabs() {
        const tabBar = document.getElementById('myTabBar');
        if (tabBar) {
            if (tabBar.style.display !== 'flex') {
                tabBar.style.display = 'flex';
            }
        }
    }


    // 2024.10.03 fixed bug
    checkParamsHasIsView() {
        const path = localStorage.getItem('currentPath');
        const tabShare = localStorage.getItem('hasTabShare');
        if (path && path === 'tab1') {// 当前是否在tab1
            const params = localStorage.getItem('detailsParams')
            if (params && params.includes('isView')) {
                return true;
            } else {
                if (tabShare !== undefined) {
                    this.appGlobalService.consoleLog(' hasTabShare1', '  	   ');
                    return true;
                }
            }
        } else {
            if (tabShare !== undefined) {
                this.appGlobalService.consoleLog(' hasTabShare2', '  	   ');
                return true;
            }
            this.appGlobalService.consoleLog('  currentPath is not tab1   ', '  	   ');
        }
        return false;
    }

    // A simple subscription that tells us what page we're currently navigating to.
    private navEvents() {

        this.router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe((e: any) => {
            console.log(new Date().toLocaleString() + '.' + new Date().getMilliseconds() + '  	   ', e);
            const currentPath: string = e.url.split('?')[0];
            if (currentPath.length > 1) {
                // encodeURI
                localStorage.setItem("currentPath", currentPath.substring(1, currentPath.length));
                if (localStorage.getItem('playOn') === currentPath.substring(1, currentPath.length)){
                    setTimeout(() => {
                        this.eventService.eventEmit.emit("playOn", currentPath.substring(1, currentPath.length));    
                    }, 200);
                    
                } else if (localStorage.getItem('playOn')) {
                    setTimeout(() => {
                        this.eventService.eventEmit.emit("stopPlay", "1");    
                    }, 200);
                    
                }
            }

            if (this.checkParamsHasIsView() && e.url.indexOf('/details?time=') > -1) {
                this.router.navigate(['/home/tab1?time=' + new Date()], { replaceUrl: true });
                return;
            }

            if (e.url.indexOf('/home/tab1?wxLoginCode') > -1 || e.url.indexOf('/return_url_wxmin?wxLoginCode') > -1) {
                const splitArray = e.url.split('=');
                let wxLoginCode = splitArray[1];
                if (localStorage.getItem('loginAccount') === "19168928480") {
                    alert('return_url_wxmin wxlogincode :' + wxLoginCode);
                }
                if (splitArray && splitArray.length >= 3) {
                    wxLoginCode = wxLoginCode.replace('&lat', '');
                    this.appGlobalService.wxLoginCode = wxLoginCode;
                    this.eventService.eventEmit.emit('bindWeChatLoginCode', wxLoginCode);
                    // 如为空则设置默认
                    let wxLat = this.appGlobalService.defaultCityCenter.lat;
                    if (splitArray[2].replace('&lng', '') !== '') {
                        wxLat = splitArray[2].replace('&lng', '');
                    }
                    let wxLng = this.appGlobalService.defaultCityCenter.lng;
                    if (splitArray[3] !== '') {
                        wxLng = splitArray[3];
                    }
                    const position = {
                        name: this.appGlobalService.defaultCityName,
                        code: this.appGlobalService.defaultCityId,
                        center: { lng: wxLng, lat: wxLat }
                    };
                    localStorage.setItem('locationFromWx', JSON.stringify(position));
                }
                if (this.checkParamsHasIsView()) {
                    this.router.navigate(['/home/tab1?time=' + new Date()], { replaceUrl: true });
                    return;
                }
                return;
            } else if (e.url.indexOf('/return_url/?code=') > -1 || e.url.indexOf('/return_url?code=') > -1) {
                // 微信浏览器支付
                const splitArray = e.url.split('=');
                let wxCode = splitArray[1];
                wxCode = wxCode.replace('&state', '');
                // if(localStorage.getItem('loginAccount') === "19168928480"){
                //     alert('wxCode :' + wxCode);
                // }
                this.appGlobalService.wxPayCode = wxCode;

                if (splitArray && splitArray.length >= 3) {
                    let pageParams = splitArray[2];
                    if (pageParams.indexOf('%') > -1) {
                        pageParams = decodeURIComponent(pageParams);
                    }
                    // alert('pageParams:' + JSON.stringify(pageParams) );
                    pageParams = JSON.parse(pageParams);
                    pageParams.params['replace'] = 'replace';
                    pageParams.params['h5flag'] = "1"; // 为了支付完成展示弹窗
                    // this.router.navigate([pageParams.params.currentPath], { queryParams: pageParams });

                    // this.appGlobalService.popTarget();
                    // if(localStorage.getItem('loginAccount') === "19168928480"){
                    //     alert('pageParams:' + JSON.stringify(pageParams) );
                    //   }
                    this.appGlobalService.goToForward(pageParams);
                }
                return;
            }
            else if (e.url.indexOf('/return_url') > -1) {
                // https://zeno-app.xw18.cn/#/return_url?pageId=11308&sessionId=fd29c891-7989-4f64-af9e-a5cb636aa4f8&param={"plugin_id":"1","opportunity_id":"5d7201d5b32968000148a443","quote_service_days":"30","price":"0.01","contract_id":"5d762400f3f83a00011f7486","source":"1","h5flag":"1","type":"转店快","service_mode":"2","content":"服务1个月"}"\
                const url: string = decodeURIComponent(e.url);
                const pString: string = url.split('?')[1];
                if (pString.indexOf('successParams') > -1) {
                    // 小程序支付成功
                    const pageParams = JSON.parse(pString.split('=')[1]);
                    // alert('支付成功!');
                    this.appGlobalService.goToForward(pageParams);
                } else if (pString.indexOf('failParams') > -1) {
                    const pageParams = JSON.parse(pString.split('=')[1]);
                    // alert('支付失败!');
                    //  if(localStorage.getItem('loginAccount') === "19925304828"){
                    //     alert('pageParams :' + pString.split('=')[1]);
                    //     alert('is  JSAPI :' + localStorage.getItem("client") === 'JSAPI');
                    // }
                    // 小程序跟App交互一致
                    if(pageParams.params && pageParams.params.wxInnerBack &&
                        Number(pageParams.params.wxInnerBack) < 0  ){
                        if ( pageParams.params && pageParams.params.needRefresh === "true" ) {
                            localStorage.setItem('needRefresh', 'true');
                        }
                        this.appGlobalService.popTarget();
                        history.go(Number(pageParams.params.wxInnerBack));
                        
                        if ( pageParams.params && pageParams.params.wxInnerBack &&
                        Number(pageParams.params.wxInnerBack) < 0  ) {
                        }
                    } else {
                        this.appGlobalService.goToForward(pageParams);
                    }
                    
                } else {
                    // H5支付
                    const sessionId = localStorage.getItem('sessionId');
                    const pageParams = {
                        pageId: "",
                        params: {},
                        sessionId
                    };
                    pString.split('&').forEach(element => {
                        const pArr = element.split('=');
                        if (pArr[0] === 'params') {
                            pageParams[pArr[0]] = JSON.parse(pArr[1]);
                        } else {
                            pageParams[pArr[0]] = pArr[1];
                        }
                    });

                    this.appGlobalService.popTarget();
                    this.appGlobalService.goToForward(pageParams);
                }
                return;
            }
            else if (e.url.indexOf('/navUrl') > -1) {
                this.showHideTabs(e);
                return;
            } else {
                if (this.appGlobalService.getUrlParamsByName(e.url,'wxLoginCode')!=''){
                    let wxLoginCode = this.appGlobalService.getUrlParamsByName(e.url,'wxLoginCode');
                    if (localStorage.getItem('loginAccount') === "19168928480") {
                        alert('return_url_wxmin wxlogincode :' + wxLoginCode);
                    }
                    this.eventService.eventEmit.emit('bindWeChatLoginCode', wxLoginCode);
                    this.appGlobalService.wxLoginCode = wxLoginCode;
                      
                    // 如为空则设置默认
                    let wxLat = this.appGlobalService.defaultCityCenter.lat;
                    let wxLng = this.appGlobalService.defaultCityCenter.lng;
                    if (this.appGlobalService.getUrlParamsByName(e.url,'lat')!=''){
                        wxLat = Number(this.appGlobalService.getUrlParamsByName(e.url,'lat')) ;

                    }
                    if (this.appGlobalService.getUrlParamsByName(e.url,'lng')!=''){
                        wxLng = Number(this.appGlobalService.getUrlParamsByName(e.url,'lng')) ;
                    }
                    const position = {
                        name: this.appGlobalService.defaultCityName,
                        code: this.appGlobalService.defaultCityId,
                        center: { lng: wxLng, lat: wxLat }
                    };
                    localStorage.setItem('locationFromWx', JSON.stringify(position));
                }
            }
            this.showHideTabs(e);
            this.reloadPrevPage();
        });
        // this.router.events.pipe(filter(e => e instanceof NavigationEnd)).subscribe((e: any) => {
        //     console.log(new Date().toLocaleString() + '.' + new Date().getMilliseconds() + '  	   ', e);
        //     const currentPath: string = e.url.split('?')[0];
        //     if (e.url.indexOf('/return_url?wxLoginCode') > -1) {

        //     } else if (e.url.indexOf('/return_url?wxLocation') > -1) {

        //     } else if (e.url.indexOf('/return_url/?code=') > -1) {

        //     } else if (e.url.indexOf('/return_url?code=') > -1) {

        //     } else if (e.url.indexOf('/return_url?') > -1) {
        //         console.log("end /return_url? >>>>")
        //         // 只有h5支付成功回调走这里
        //         // https://zeno-app.xw18.cn/#/return_url?pageId=11308&sessionId=fd29c891-7989-4f64-af9e-a5cb636aa4f8&param={"plugin_id":"1","opportunity_id":"5d7201d5b32968000148a443","quote_service_days":"30","price":"0.01","contract_id":"5d762400f3f83a00011f7486","source":"1","h5flag":"1","type":"转店快","service_mode":"2","content":"服务1个月"}"\
        //         const url: string = decodeURIComponent(e.url);
        //         const pString: string = url.split('?')[1];
        //         if (pString.indexOf('successParams') > -1) {
        //             // 小程序支付成功
        //             const pageParams = JSON.parse(pString.split('=')[1]);
        //             // alert('支付成功!');
        //             this.appGlobalService.goToForward(pageParams);
        //         } else if (pString.indexOf('failParams') > -1) {
        //             const pageParams = JSON.parse(pString.split('=')[1]);
        //             // alert('支付失败!');
        //             this.appGlobalService.goToForward(pageParams);
        //         } else {
        //             // H5支付
        //             const sessionId = localStorage.getItem('sessionId');
        //             const pageParams = {
        //                 pageId: "",
        //                 params: {},
        //                 sessionId
        //             };
        //             pString.split('&').forEach(element => {
        //                 const pArr = element.split('=');
        //                 if (pArr[0] === 'params') {
        //                     pageParams[pArr[0]] = JSON.parse(pArr[1]);
        //                 } else {
        //                     pageParams[pArr[0]] = pArr[1];
        //                 }
        //             });

        //             this.appGlobalService.popTarget();
        //             this.appGlobalService.goToForward(pageParams);
        //         }
        //     }

        // });
    }
    reloadPrevPage() {
        if ((localStorage.getItem('needRefresh-2') === 'true'
            || localStorage.getItem('needRefresh') === 'true')
            && !this.shouldShow) { // 普通页面刷新
            console.log('reloadPrevPage need Refresh page data 刷新页面 ------->\n');
            let params = this.appGlobalService.getCurrentTarget();

            // 蜂喔商户2.1.0 销售中土特管理tab切换指定选中
            if (params && params.params && params.params.needCheckAndReplaceIndexTab !== undefined) {
                if (this.appGlobalService[params.params.needCheckAndReplaceIndexTab] !== undefined && params.params.indexTab !== undefined) {
                    params.params.indexTab = this.appGlobalService[params.params.needCheckAndReplaceIndexTab];
                }
            }

            // 蜂喔2.2.8 2023年9月22日新增用于计算districtCode
            if (params && params.params && params.params.calculateDistrictCode !== undefined) {
                let position = JSON.parse(localStorage.getItem("position"));
                if (position.districtCode) {
                    params.params.calculateDistrictCode = position.districtCode;
                }
            }

            // 蜂喔商户 2.2.19 本地生活搜索查询条件新增经纬度参数
            if (params && params.params && params.params.useSelectedPosition !== undefined) {
                const lng = this.appGlobalService.getAddressLng ? this.appGlobalService.getAddressLng : params.params.longitude;
                const lat = this.appGlobalService.getAddressLat ? this.appGlobalService.getAddressLat : params.params.latitude;
                this.eventService.eventEmit.emit('getAddressByPoint', '' + lng + ',' + lat);
                if (this.appGlobalService.getAddressLng) {
                    params.params.longitude = this.appGlobalService.getAddressLng;
                }
                if (this.appGlobalService.getAddressLat) {
                    params.params.latitude = this.appGlobalService.getAddressLat;
                }
            }

            if (this.appGlobalService.needAppendAddressId) {// shop_ship_address_id
                if (params && params.params && params.params[this.appGlobalService.itemKeyName] !== undefined) {
                    params.params[this.appGlobalService.itemKeyName] = this.appGlobalService.shopAddressSelectItemId;
                }
                console.log('addressID=', params.params[this.appGlobalService.itemKeyName]);
            }

            if (params && params.sessionId) {
                params.sessionId = localStorage.getItem('sessionId');
            } else {
                params = { sessionId: localStorage.getItem('sessionId') };
            }

            if (this.appGlobalService.needShopShipAddressId === true && this.appGlobalService.shopAddressSelectItemId) {
                params.params['shop_local_address_id'] = this.appGlobalService.shopAddressSelectItemId;
            }
            // if (params.params && params.params.latitude !== undefined
            //     && params.params.longitude !== undefined
            //     && params.params.needUseMapLocation !== undefined) {
            //     // if (localStorage.getItem('mapPosition')) {
            //     //     params.params['location'] = {
            //     //         latitude: JSON.parse(localStorage.getItem('mapPosition')).center.lat,
            //     //         longitude: JSON.parse(localStorage.getItem('mapPosition')).center.lng
            //     //     };
            //     // }
            // }


            if (localStorage.getItem('searchParams') !== null) { // search 结果刷新
                params = JSON.parse(localStorage.getItem('searchParams'));
                localStorage.setItem('subSearchParams', JSON.stringify(params));
                localStorage.removeItem('searchParams');
                localStorage.removeItem('invitationArr');
                this.httpService.post('application/page', params, res => {
                    this.appGlobalService.refreshPageData(res);
                });
            } else if (localStorage.getItem('lastNavIndex') &&
                Number(localStorage.getItem('lastNavIndex')) > this.navPage) {
                // localStorage.removeItem('needRefresh-2');
                this.httpService.post('application/page', params, res => {
                    this.appGlobalService.refreshPageData(res, '', (data) => {
                        // window 未获取到 tabs （目前H5页面获取不到）
                        if (data === 'tabsIsNull') {
                            this.getPageData(res, pageData => {
                                setTimeout(() => {
                                    this.eventService.eventEmit.emit('refreshPageData' + localStorage.getItem('currentPath'), pageData);
                                    console.log('refreshPageData-eventEmit to --->' + localStorage.getItem('currentPath'));
                                }, 500);
                            });
                        }
                    });
                });
            }
        } else if (this.shouldShow) { // 是否刷新 tab1-5
            localStorage.removeItem('needRefresh-2');
            localStorage.removeItem('needRefresh');
            this.appGlobalService.popAllTarget();
            localStorage.removeItem('lastNavIndex');


        }
        if (window['pageModalService']) {
            window['pageModalService'].closeAllModal();// 2024.01.05
        }
    }

    reloadCurrentPage() {

        if (localStorage.getItem('searchParams') !== null) { // search 结果刷新
            const params = JSON.parse(localStorage.getItem('searchParams'));
            this.httpService.post('application/page', params, res => {
                this.appGlobalService.refreshPageData(res);
            });

        } else if (!this.shouldShow || localStorage.getItem('currentPath') === 'details') { // 普通页面刷新
            console.log('need Refresh reload Current Page  ------->\n');
            const params = this.appGlobalService.getCurrentTarget();

            if (params !== undefined && params !== null) {
                params.sessionId = localStorage.getItem('sessionId');
                // 当访问需要登录的页面时 遇到session无效 重新登录
                if (params.params !== undefined && params.params.oneLogin !== undefined && params.params.passwordLogin !== undefined && params.params.visitor === undefined && localStorage.getItem('loginStatus') !== 'true') {
                    // this.appGlobalService.popTarget()
                    // params.params['replace'] = "replace";
                    // 重新登录 应屏蔽登录配置的tabIndex
                    localStorage.setItem('needLoginToRefreshPage', "true")
                    // 包含登录参数 先登录
                    window['pageModalService'].toLogin({ params: params.params }, '');
                    return;
                } else
                    if (this.appGlobalService.clientType === 'lj' || this.appGlobalService.clientType === 'js') {
                        if (localStorage.getItem('quote_way')) {
                            const quoteWay = localStorage.getItem('quote_way');
                            if (params.params.quote_way !== undefined) {
                                params.params.quote_way = quoteWay;
                            }
                        }
                        // 蜂喔商户2.1.0 销售中土特管理tab切换指定选中
                        if (params.params && params.params.needCheckAndReplaceIndexTab !== undefined) {
                            if (this.appGlobalService[params.params.needCheckAndReplaceIndexTab] !== undefined && params.params.indexTab !== undefined) {
                                params.params.indexTab = this.appGlobalService[params.params.needCheckAndReplaceIndexTab];
                            }
                        }
                    }


                if (localStorage.getItem('shop_goods_class_id')) {
                    params.params['shop_goods_class_id'] = localStorage.getItem('shop_goods_class_id');
                }

                if (params && params.params && params.params.useSelectedPosition) { // 配置了才更新
                    const lng = this.appGlobalService.getAddressLng ? this.appGlobalService.getAddressLng : params.params.longitude;
                    const lat = this.appGlobalService.getAddressLat ? this.appGlobalService.getAddressLat : params.params.latitude;
                    params.params.longitude = lng;
                    params.params.latitude = lat;
                }

                this.httpService.post('application/page', params, res => {
                    this.appGlobalService.refreshPageData(res);
                });
            } else {
                // 刷新
                if (localStorage.getItem('currentPath') === 'details' && localStorage.getItem('reGetSession') === 'true') {
                    this.eventService.eventEmit.emit('reGetDetailsPage', 'true');
                }
                else {
                    window.location.reload();
                }

            }

        } else if (this.shouldShow) { // 是否刷新 tab1-3

            this.appGlobalService.popAllTarget();
            localStorage.removeItem('lastNavIndex');
            if (this.tabPage === "tab1" || this.tabPage === "") {
                // 刷新
                localStorage.setItem('needRefreshTab1', 'true');
                this.eventService.emit('tab1', 'true');
            } else {
                // this.appGlobalService.goBack();
                localStorage.setItem('needRefreshTab2', 'true');
                localStorage.setItem('needRefreshTab3', 'true');
                localStorage.setItem('needRefreshTab4', 'true');
                localStorage.setItem('needRefreshTab5', 'true');
                this.eventService.emit(this.tabPage, 'true');
            }
        }
    }

    private showHideTabs(e: any) {
        // Result:  e.url: "/tabs/groups/new-group?type=group"
        // Split the URL up into an array.
        const urlArray = e.url.split('/');
        // Result: urlArray: ["", "tabs", "groups", "new-group?type=group"]
        // Grab the parentUrl
        const pageUrlParent = urlArray[urlArray.length - 2];
        // Grab the last page url.
        const pageUrl = urlArray[urlArray.length - 1];
        // Result: new-group?type=group

        const page = pageUrl.split('?')[0];
        // Result: new-group
        // Check if it's a routeParamPage that we need to show on
        // tslint:disable-next-line: align
        const showParamPage = this.routeParamPages.indexOf(pageUrlParent) > -1 && !isNaN(Number(page));
        // Check if we should hide or show tabs.
        const shouldShow = this.showTabBarPages.indexOf(page) > -1; // || showParamPage;
        this.shouldShow = shouldShow;

        if (this.shouldShow) {
            localStorage.setItem('tab', page);
            this.tabPage = page; // tab1-5
        } else {
            this.navPage = Number(page.substring(3)) > 0 ? Number(page.substring(3)) : 0;
        }

        // Result: true

        // Not ideal to set the timeout, but I haven't figured out a better method to wait until the page is in transition...
        // try {
        //     setTimeout(() => shouldShow ? this.showTabs() : this.hideTabs(), 100);
        // } catch (err) {
        // }
    }
    currentTab() {
        return this.tabPage;
    }
    getPageData(res, callback: Function) {
        this.headerComs = [];
        const headerContainer = [];
        const comContainer = [];
        const footerContainer = [];

        const tmpPageData = JSON.parse(res.script);
        // 1.6.25 新增折叠手风琴推荐列表 如果是从更多推荐点击右上角返回到上一个页面则需要刷新
        if (res.script.includes('"style":"tag.AppSimpleDetailTagLogic",') && res.script.includes('"cssType":"30-accordionList"')) {
            const len = tmpPageData.views[0].tags.length - 1;
            let ele1;
            let ele2;
            let index1;
            let index2;
            for (let index = 0; index < len; index++) {
                const element = tmpPageData.views[0].tags[index];
                if (element.style === 'tag.AppSimpleDetailTagLogic' && element.data.cssType === '30-accordionList') {
                    ele1 = element;
                    index1 = index;
                } else if (element.style === 'appGeneralListTag' && element.name.includes('_innerAccordionList')) {
                    ele2 = element;
                    index2 = index;
                } else if (element.style === 'orderInfoListTag' && element.name.includes('_innerAccordionList')) {
                    ele2 = element;
                    index2 = index;
                }
            }
            if (ele1 && ele2) {
                ele1['recommendListData'] = ele2;
                tmpPageData.views[0].tags[index1] = ele1;
                tmpPageData.views[0].tags[index2] = { type: 'tag', style: 'un-resevole-tag' };
            }
            res.script = JSON.stringify(tmpPageData);
            this.titleBar = { cssStyle: '' };
        }

        if (res.script.includes('"disableBack":true,') || res.script.includes('"disableBackConfig":"true"')) {
            console.log('setDisableBack 2');
            const targetObj = JSON.parse(localStorage.getItem('targetObj'));
            if (targetObj && targetObj.bat && targetObj.bat.length > 0) {
                targetObj.forward = targetObj.bat[targetObj.bat.length - 1];
                targetObj.forward.disableBack = true;
                localStorage.setItem('targetObj', JSON.stringify(targetObj));
            }
        }

        const pageData = JSON.parse(res.script);

        this.titleBar =
            (JSON.stringify(pageData.titleBar) !== undefined && JSON.stringify(pageData.titleBar) !== '{}') ? pageData.titleBar : undefined;

        // 1.6.29 numberOfCart
        if (this.titleBar && this.titleBar.cart && this.titleBar.cart.count !== undefined) {
            if (this.titleBar.cart.link && this.titleBar.cart.link.params && this.titleBar.cart.link.params.useCartNumber) {
                window['chatService'].setCartItemCount(this.titleBar.cart.count, true);
            }
        }
        this.backgroundImg = this.titleBar && this.titleBar.background ?
            'url("' + this.titleBar.background + '") no-repeat center' : undefined;
        this.showWaterImg = pageData.showWaterImg;
        let searchInputParams;
        if (null != localStorage.getItem('subSearchParams')) {
            const params = JSON.parse(localStorage.getItem('subSearchParams'));
            searchInputParams = params.params;
            localStorage.removeItem('subSearchParams');
        }
        let tags: any = [];
        if (pageData.type === 'tag') {
            tags = [pageData];
        } else {
            tags = pageData.views === undefined ? pageData.tags : pageData.views[0].tags;
            if (tags && tags.length > 0) {
                this.manageTags(tags, tag => {
                    if (tag) {
                        tags.push(tag);
                    }
                });

            }
        }
        if (!tags || (tags && tags.length === 0)) {
            tags = [];
            // 如果是申请开店 或者是 蜂喔登录
            if (pageData.style && pageData.style === 'page.ApplyHomePageLogic') {
                const tag = {
                    style: "applyHomeTag",
                    linearLayout: "body",
                    type: "tag",
                    data: pageData.data
                };
                tags.push(tag);
            } else if (pageData.style && pageData.style === 'page.AppLoginPageLogic') {


                const tag = {
                    style: "laijianLoginTag",
                    linearLayout: "body",
                    type: "tag",
                    data: {
                        account: pageData.account,
                        password: pageData.password,
                        button: pageData.button,
                        forget: pageData.forget,
                        register: pageData.register,
                        title: pageData.title,
                        loginIcon: pageData.loginIcon,
                        iconCssStyle: pageData.iconCssStyle,
                        agreement: pageData.agreement ? pageData.agreement : {},
                        successLink: pageData.successLink,
                        perfectLink: pageData.perfectLink,// 1.6.20
                        fingerprintBut: pageData.fingerprintBut,// 1.6.14 赚钱宝
                        otherLink: pageData.otherLink ? pageData.otherLink : null,// 2.1.0 蜂喔商户
                        otherLink1: pageData.otherLink1 ? pageData.otherLink1 : null,// 2.1.1 蜂喔商户 2023年6月15日新增
                        otherLink2: pageData.otherLink2 ? pageData.otherLink2 : null,// 2.1.1 蜂喔商户 2023年6月15日新增
                        tips: pageData.tips
                    }
                };
                // if (localStorage.getItem('client') === 'APP') {
                tag.data['wxLink'] = pageData.wxLink;// 2.1.0 蜂喔用户授权登录; 2.2.6 蜂喔商户微信授权登录
                // }

                tags.push(tag);
            }

        } else {

        }

        this.controllerTagToContainer(headerContainer, comContainer, footerContainer, tags, searchInputParams);
        this.coms = comContainer;
        this.headerComs = headerContainer;
        this.footerComs = footerContainer;
        this.pageData = {
            headerComs: this.headerComs,
            coms: this.coms,
            titleBar: this.titleBar,
            isGrayBg: pageData.isGrayBg,
            bgCssStyle: pageData.bgCssStyle,
            disabled: pageData.disabled,
            showRefresher: pageData.showRefresher,
            showLoading: pageData.showLoading,
            backgroundImg: this.backgroundImg,
            showWaterImg: this.showWaterImg,
            footerComs: this.footerComs,
            scrollToTopBtn: pageData.scrollToTop ? pageData.scrollToTop : false
        };
        // console.log('tabs service page data------->', JSON.stringify(this.pageData) );
        callback(this.pageData);
    }

    manageTags(tags, callBack?: Function) {
        let hasTipsDivTag = false;
        let hasAletDivTag = false;

        tags.forEach(element => {
            if (element) {
                if (element.style === 'recommendChooseTag') {
                    if (element.data.chooseSubmit !== undefined) {
                        if (element.data.chooseSubmit
                            && element.data.chooseSubmit.content
                            && !element.data.chooseSubmit.content.hiddenChooseSubmit) {
                            const tag = {
                                style: "tag.recommendChooseAll",
                                linearLayout: "footer",
                                type: "tag",
                                data: { chooseSubmit: element.data.chooseSubmit }
                            };
                            callBack(tag);
                        }

                    }


                } else if (element.style === 'tag.CustomInfoTagLogic') {
                    const tag = {
                        style: "tag.CustomPhoneTag",
                        linearLayout: "footer",
                        type: "tag",
                        data: { userInfo: element.data.userInfo }
                    };
                    callBack(tag);
                } else if (element.style === 'tag.AppSignConTagLogic') {
                    const tag = {
                        style: "tag.AppSignPayTagLogic",
                        linearLayout: "footer",
                        type: "tag",
                        data: { bottom: element.data.bottom }
                    };
                    callBack(tag);
                } else if (element.style === 'tipsDivTag') {
                    // 特殊标签 tipsDivTag  返回的时候提示框用
                    hasTipsDivTag = true;
                    if (element.data.tipsDiv) {
                        element.data.tipsDiv.styleName = element.name;
                    }
                    this.appGlobalService.tipsDiv = element.data.tipsDiv ? element.data.tipsDiv : undefined;
                    if (this.appGlobalService.tipsDiv) {
                        this.totalCount();
                    }
                } else if (element.style === 'inquiry-page-style') {
                    // 特殊标签 inquiry-page-style  返回的时候提示框用
                    hasAletDivTag = true;
                    this.appGlobalService.alertDiv = element.data ? element.data : undefined;
                    if (this.appGlobalService.alertDiv) {
                        this.alertDivTotalCount();
                    }
                } else if (element.style === 'tag.AppTabTagLogic') {
                    if (element.currentData && element.currentData.tags && element.currentData.tags.length > 0) {

                        this.manageTags(element.currentData.tags, tag => {
                            if (tag) {
                                tags.push(tag);
                            }
                        });
                        // if (element.currentData.isShell === true &&
                        //     element.data &&
                        //     element.data.length > 0 &&
                        //     element.currentTab &&
                        //     element.data[element.currentTab - 0].partLink &&
                        //     element.data[element.currentTab - 0].partLink.target &&
                        //     element.data[element.currentTab - 0].partLink.params
                        // ) {
                        //     const p = JSON.parse(JSON.stringify(element.data[element.currentTab - 0].partLink.params));
                        //     p["isShell"] = true;
                        //     const params: any = {
                        //         viewId: element.data[element.currentTab - 0].partLink.target,
                        //         sessionId: localStorage.getItem("sessionId"),
                        //         params: p
                        //     }
                        //     this.httpService.postForShellData('application/part', params, true);
                        // }
                    }
                } else if (element.style === 'dynamicDetailsTag') {
                    if (element.data.footDiv !== undefined) {
                        const tag = {
                            style: "tag.dynamicDetailsTag",
                            linearLayout: "footer",
                            type: "tag",
                            data: { footDiv: element.data.footDiv }
                        };
                        callBack(tag);
                    }
                }
            }



        });
        // 清除上一个页面提示
        if (!hasTipsDivTag) {
            this.appGlobalService.tipsDiv = undefined;
        }

        // 清除上一个页面提示
        if (!hasAletDivTag) {
            this.appGlobalService.alertDiv = undefined;
        }
    }
    controllerTagToContainer(headerContainer: any, comContainer: any, footerContainer: any, tags: any, searchInputParams?, isPullToRefresh?: number) {
        if (tags && tags.length !== undefined) {
            for (let i = 0, len = tags.length; i < len; i++) {
                const tag = tags[i];
                if (tag) {
                    if (tag.linearLayout === 'body' || !tag.linearLayout) {
                        const style = tag.style;
                        if (isPullToRefresh !== undefined && isPullToRefresh !== null) {
                            if (isPullToRefresh > 0) {
                                tag.isPullToRefresh = true;
                            } else {
                                tag.isPullToRefresh = false;
                            }
                        }
                        this.pushTagToContainer(comContainer, style, tag, searchInputParams);
                    } else if (tag.linearLayout === 'header') {
                        this.getComsDataByStyle(tag.style, data => {
                            if (data) {
                                headerContainer.push(data);
                            }
                        }, tag, searchInputParams);
                    } else if (tag.linearLayout === 'footer') {
                        this.getComsDataByStyle(tag.style, data => {
                            if (data) {
                                footerContainer.push(data);
                            }
                        }, tag, searchInputParams);
                    } else if (tag.linearLayout === 'nextPage') {
                        // 公司认证专用 蜂喔发下一步骤
                        this.appGlobalService.globalSubmitBtnData = tag;
                    }
                }

            }
        }
    }


    getComsDataByStyle(style: any, callback: Function, tag: any, searchInputParams?, isPart?: Boolean) {
        let coms;
        switch (style) {
            case 'tag.AppTabTagLogic':
                if (tag.ifsearch && searchInputParams != null) {
                    const dataLen = tag.data.length;
                    for (let j = 0; j < dataLen; j++) {
                        const k = tag.data[j];
                        const newObj = {};
                        Object.assign(newObj, k.partLink.params, searchInputParams);
                        // k.partLink.params.search = searchInputParams.search;
                        tag.data[j] = k;
                    }
                }
                if (tag && tag.isGrayBg !== undefined) {
                    this.immediatelyUpdateBg(tag.isGrayBg);
                } else {
                    this.immediatelyUpdateBg(true);
                }
                if (tag.name === 'homeAppTabTag') { // 首页或者tab2.page.ts用到的固定在ion-header中的tab
                    if (this.appGlobalService.clientType !== 'js' && this.appGlobalService.clientType !== 'lj') {
                        coms = new ComItem(TopTabComponent, tag);
                        const dataLen = tag.data.length;
                        for (let j = 0; j < dataLen; j++) {
                            setTimeout(async () => {
                                const topTapPartParams = {
                                    viewId: tag.data[j].partLink.target,
                                    sessionId: localStorage.getItem("sessionId"),
                                    params: tag.data[j].partLink.params
                                };
                                localStorage.setItem('topTapPartParams' + j, JSON.stringify(topTapPartParams));
                                this.httpService.post('application/part',
                                    topTapPartParams, async (res: any) => {
                                        if (res) {
                                            localStorage.setItem('topTapPart' + j, res.script);
                                        }
                                    });
                            }, 50);
                        }
                        break;
                    }
                } else if (tag.name === 'imagesTag') { // 用于跳转到新的页面例如nav-one-component里面嵌套的标签 固定在ion-header中的tab
                    coms = new ComItem(FixedTabComponent, tag); break;
                } else if (tag.name === 'defaultTabTag') { // 固定在ion-content中的tab
                    coms = new ComItem(ButtonNavDefaultComponent, tag); break;
                } else if (tag.name === 'buttonNav1') { // 固定在ion-content中的tab 适用于 tab1.page.ts
                    coms = new ComItem(ButtonNavOneComponent, tag); break;
                } else if (tag.name === 'ngMobileTabs') { // 新的一个标签使用了ng-mobile-ant-design控件
                    coms = new ComItem(TabsNgZorroMobileComponent, tag); break;
                } else if (tag.name === 'buttonNav2') { // 固定在ion-content中的tab 适用于 tab2.page.ts
                    coms = new ComItem(ButtonNavTwoComponent, tag); break;
                } else if (tag.name === 'buttonNav3') { // 固定在ion-content中的tab 适用于 tab3~5.page.ts 或者 新页面 nav-one.component.ts组件
                    coms = new ComItem(ButtonNavThreeComponent, tag); break;
                } else if (tag.name === 'buttonNav4') {
                    coms = new ComItem(ButtonNavFourComponent, tag); break;
                } else if (tag.name === 'buttonNav5') {
                    coms = new ComItem(ButtonNavFiveComponent, tag); break;
                } else {
                    coms = new ComItem(ButtonNavComponent, tag); break;
                }
            // break;
            case 'chartTag': coms = new ComItem(FengWoChatComponent, tag); break;
            case 'recommendIndexTag': coms = new ComItem(RecommendMessageComponent, tag); break;
            case 'appTabTag-smooth-style': coms = new ComItem(SmoothStyleButtonComponent, tag); break;
            case 'tag.CityListLogic': coms = new ComItem(ChooseCityComponent, tag); break;
            case 'tag.RegisterTagLogic': coms = new ComItem(RegisterComponent, tag); break;
            case 'tag.RecentNewsTagLogic': coms = new ComItem(NewsListComponent, tag); break;
            case 'tag.MyTagLogic': coms = new ComItem(MineComponent, tag); break;
            case 'tag.ChangePwdLogic': coms = new ComItem(ChangePwdComponent, tag); break;
            case 'tag.DetailTagLogic': coms = new ComItem(DetailComponent, tag); break;
            case 'tag.SimpleListTagLogic': coms = new ComItem(ShowListComponent, tag); break;
            case 'tag.ChartLinkLogic': coms = new ComItem(IconLinkComponent, tag); break;
            case 'tag.FilterTagLogic': coms = new ComItem(SiftComponent, tag); break;
            case 'newFilterTag': coms = new ComItem(SiftComponent, tag); break;
            case 'tag.AppDataMapIndexTagLogic': coms = new ComItem(DataMapComponent, tag); break;
            case 'tag.ProjectListTagLogic': coms = new ComItem(ProjectListComponent, tag); break;
            case 'tag.AddressTagLogic': coms = new ComItem(AddressMapComponent, tag); break;
            case 'tag.AppPublishTagLogic': coms = new ComItem(PostAndEitorComponent, tag); break;
            case 'tag.AppGeneralFormTagLogic': coms = new ComItem(PostEditFormComponent, tag); break;
            case 'appInfoListTag': coms = new ComItem(InformationHallComponent, tag); break;
            case 'tag.DetailListTagLogic': coms = new ComItem(DetailListComponent, tag); break;
            case 'tag.BasicListTagLogic': coms = new ComItem(BasicListComponent, tag); break;
            case 'tag.ExampleListTagLogic': coms = new ComItem(ExampleListComponent, tag); break;
            case 'tag.StoreListTagLogic': coms = new ComItem(StoreListComponent, tag); break;
            case 'tag.ChoiceButtonTagLogic': coms = new ComItem(ChooseTypeComponent, tag); break;
            case 'tag.QueryFilterTagLogic': coms = new ComItem(SiftFilterComponent, tag); break;
            case 'tag.ColumnTagLogic': coms = new ComItem(ColumnTagComponent, tag); break;
            case 'tag.AppImageListTagLogic': coms = new ComItem(SlidesImgageComponent, tag); break;
            case 'tag.BlockTagLogic': coms = new ComItem(BlockLinkComponent, tag); break;
            case 'tag.ContactTagLogic': coms = new ComItem(LogoCallComponent, tag); break;
            case 'tag.PhoneTagLogic': coms = new ComItem(CallComponent, tag); break;
            case 'appHeadRotateTag': coms = new ComItem(VideoImageComponent, tag); break;
            case 'bIcon-link-style': coms = new ComItem(BIconLinkComponent, tag); break;
            case 'bicon-links-style': coms = new ComItem(BiconLinksComponent, tag); break;
            case 'appPublishentrance': coms = new ComItem(PublishTitleComponent, tag); break;
            case 'appCaseRecommedListTag': coms = new ComItem(InvestmentListComponent, tag); break;
            /* case 'appNotServiceVipTag': coms = new ComItem(OpenMemberComponent, tag); break; */
            case 'appConsultantlist': coms = new ComItem(AttractListComponent, tag); break;
            case 'tag.AppIconListTagLogic': coms = new ComItem(SettingsPage, tag); break;
            case 'tag.TagTagLogic': coms = new ComItem(ButtonNavComponent, tag); break;
            case 'tag.AppOppDetailTagLogic': coms = new ComItem(TransferDetailComponent, tag); break;
            case 'quoteQrCode': coms = new ComItem(QrcodeComponent, tag); break;
            case 'tag.VideoTagLogic': coms = new ComItem(VideoComponent, tag); break;
            case 'videoNewTag': coms = new ComItem(VideoComponent, tag); break;
            case 'tag.AboutTagLogic': coms = new ComItem(AboutUsPage, tag); break;
            case 'aboutTag': coms = new ComItem(AboutUsPage, tag); break;
            case 'tag.ServiceTitleTagLogic': coms = new ComItem(TitleComponent, tag); break;
            case 'tag.ArticleTagLogic': coms = new ComItem(ArticleListComponent, tag); break;
            case 'collectCommendTag': coms = new ComItem(RecommendListComponent, tag); break;
            case 'appCommendTag': coms = new ComItem(RecommendListComponent, tag); break;
            case 'zrexactCommendTag': coms = new ComItem(RecommendListComponent, tag); break;
            case 'exactCommendTag':
                if (tag.data.tagStyle && tag.data.tagStyle === 'recommendList') {
                    coms = new ComItem(FilterRecommendListComponent, tag); break;
                } else {
                    coms = new ComItem(RecommendListComponent, tag); break;
                }
            case 'caseTag': if (tag.data !== undefined && tag.data.moreButton !== undefined) { coms = new ComItem(CaseComponent, tag); } else { coms = new ComItem(ConsultantListComponent, tag); } break;
            case 'imglistTag': coms = new ComItem(MineListComponent, tag); break;
            case 'tag.ShopPosterInfoTagLogic': this.isGrayBg = true; coms = new ComItem(PosterCallComponent, tag); break;
            case 'tag.ChangeShopImageTagLogic': coms = new ComItem(PosterComponent, tag); break;
            case 'consultantTag': coms = new ComItem(CounselorListComponent, tag); break;
            case 'tag.MessageWheelTagLogic': coms = new ComItem(NewsCarouselComponent, tag); break;
            case 'app-serviceGuarantee-tag': coms = new ComItem(ZoologySystemComponent, tag); break;
            case 'app-memberService-tag': coms = new ComItem(MembershipServiceComponent, tag); break;
            case 'appBrandListTag': coms = new ComItem(BrandListComponent, tag); break;
            case 'tag.AppContract': coms = new ComItem(ContractOffComponent, tag); break;
            case 'premiumTopTag': coms = new ComItem(OptimizationBrandComponent, tag); break;
            case 'optaddressTag': coms = new ComItem(BrandComponent, tag); break;
            // 顾问详情、星级推荐人、星级推荐人1、设计师主页-服务评价、直租直售顾问店铺 1.9.0 新增微信复制功能、装修公司主页
            case 'tag.AppSimpleDetailTagLogic': coms = new ComItem(StoreConsultantComponent, tag); break;
            case 'tag.AppHelpTransOrSitingTagLogic': coms = new ComItem(HelpTransferSitingComponent, tag); break;
            case 'tag.AppConsultantTagLogic': coms = new ComItem(CounselorComponent, tag); break;
            case 'imageTextTag': coms = new ComItem(ServiceEvaluationComponent, tag); break;
            case 'tipsTag': coms = new ComItem(TipsComponent, tag); break;
            case 'simpleTextTag': coms = new ComItem(WaySkillsComponent, tag); break;
            case 'splitLineTag': coms = new ComItem(LineComponent, tag); break;
            case 'voiceTag': coms = new ComItem(VoiceComponent, tag); break;
            case 'tag.AppQuotationListTagLogic': coms = new ComItem(ServiceQuoteComponent, tag); break;
            case 'tag.AppQuotationLJTagLogic': coms = new ComItem(ServiceQuoteLjComponent, tag); break;
            case 'tag.AppNormalButtonTagLogic': coms = new ComItem(CommonBtnComponent, tag); break;
            case 'tag.AppGeneralPayTagLogic': coms = new ComItem(PayWayComponent, tag); break;
            case 'tag.AppAgreeTagLogic': coms = new ComItem(ServiceAgreementCheckedComponent, tag); break;
            case 'tag.AppQuotationRemarkLogic': coms = new ComItem(QuotationRemarkComponent, tag); break;
            case 'app-serviceInfo-tag': coms = new ComItem(ServiceDetailsComponent, tag); break;
            case 'tag.AppServicePriceTagLogic': coms = new ComItem(ServiceQuoteSalesmanComponent, tag); break;
            case 'appServiceDetailMessageInfoTag': coms = new ComItem(ServiceBriefComponent, tag); break;
            case 'appMessageInfoListTag': coms = new ComItem(FinishcompanyListComponent, tag); break;
            case 'tag.AppPayResultTagLogic': coms = new ComItem(PaySuccessComponent, tag); break;
            case 'simpleIconTag': coms = new ComItem(FooterLogoComponent, tag); break;
            case 'countTipsTag': coms = new ComItem(TopTipsComponent, tag); break;
            case 'buttonIconTag': coms = new ComItem(InvitationToShopComponent, tag); break;
            case 'simpleLinkTag': coms = new ComItem(FooterProtocolComponent, tag); break;
            case 'systemMessagesTag': coms = new ComItem(SystemNewsComponent, tag); break;
            case 'invitationMessageTag': coms = new ComItem(ChatInviteComponent, tag); break;
            case 'evaluationTag': coms = new ComItem(CustomerEvaluationComponent, tag); break;
            case 'tag.HtmlTemplateTagLogic': coms = new ComItem(ProtocolTemplateComponent, tag); break;
            case 'promotionRecordTag': coms = new ComItem(PromotionRecordListComponent, tag); break;
            case 'CustomerServiceTag': coms = new ComItem(CustomerServiceComponent, tag); break;
            case 'tag.AppShopAdviserTagLogic': coms = new ComItem(ExclusiveConsultantComponent, tag); break;
            case 'tag.AppInfoChartTagLogic': coms = new ComItem(BrowsingVolumeComponent, tag); break;
            case 'tag.AppServiceCountTagLogic': coms = new ComItem(PromotionOfStatisticsComponent, tag); break;
            case 'tag.AppServiceApplyTagLogic': coms = new ComItem(SubmitFormComponent, tag); break;
            case 'appRankListTag': coms = new ComItem(RankingComponent, tag); break;
            case 'tag.AppServiceVipTagLogic': coms = new ComItem(MemberStatusComponent, tag); break;
            case 'appNotServiceVipTag': coms = new ComItem(OpenMemberComponent, tag); break;
            case 'appTransitBg': coms = new ComItem(BackgroundStyleComponent, tag); break;
            case 'appProgressBar': coms = new ComItem(ProgressBarComponent, tag); break;
            case 'appMessageDetailTag': coms = new ComItem(BusinessSummaryComponent, tag); break;
            case 'appTipIcon': coms = new ComItem(PromptMapComponent, tag); break;
            case 'appLoginLimitTag': coms = new ComItem(ToAppComponent, tag); break;
            case 'app-remarkList-Tag': coms = new ComItem(RemarksComponent, tag); break;
            case 'appPageInnerTitle': coms = new ComItem(InnerTitleComponent, tag); break;
            // 共用
            case 'app-additionRecordList-tag': coms = new ComItem(VerifyListComponent, tag); break;
            case 'verifyListTag': coms = new ComItem(VerifyListComponent, tag); break;
            case 'lastContactListTag': coms = new ComItem(LastContactListComponent, tag); break;
            case 'pyCustomerListTag': coms = new ComItem(PyCustomerListComponent, tag); break;
            case 'branchSheetTag': coms = new ComItem(BranchSheetComponent, tag); break;
            case 'app-quoteInfo-Tag': coms = new ComItem(QuoteInfoComponent, tag); break;
            case 'tag.AppFormTagLogic': coms = new ComItem(SearchFilterComponent, tag); break;
            case 'app-buttonHeap-Tag': coms = new ComItem(ButtonHeapComponent, tag); break;
            case 'tag.AppJobListTagLogic': coms = new ComItem(JobManagerComponent, tag); break;
            case 'searchInputTag': coms = new ComItem(SearchInputComponent, tag); break;
            case 'tag.AppMyAchievementTagLogic': coms = new ComItem(MyAchievementChartComponent, tag); break;
            case 'appExtendPicture': coms = new ComItem(ExtendPictureComponent, tag); break;
            case 'app-caseRemark-Tag': coms = new ComItem(CaseRemarkComponent, tag); break;
            case 'app-moreButton-tag': coms = new ComItem(MoreButtonComponent, tag); break;
            case 'appGeneralmanageFormTag': coms = new ComItem(AdvertisePlayComponent, tag); break;
            case 'tag.AdvertisementPlayTagLogic': coms = new ComItem(AdvertisePlayComponent, tag); break;
            case 'advertiseTag': coms = new ComItem(AdvertiseComponent, tag); break;
            case 'tag.AppGeneralButtonTagLogic': coms = new ComItem(CommonSubmitBtnComponent, tag); break;
            case 'analysisChartTag': coms = new ComItem(AnalysisChartComponent, tag); break;
            case 'industryAnalysisTag': coms = new ComItem(IndustryAnalysisComponent, tag); break;
            case 'rentCompareTag': coms = new ComItem(RentCompareComponent, tag); break;
            case 'customerSourceTag': coms = new ComItem(CustomerSourceComponent, tag); break;
            case 'tag.PeripheralInfoTagLogic': coms = new ComItem(PeripheralInfoComponent, tag); break;
            case 'appHorizontalListTag': coms = new ComItem(HorizontalListComponent, tag); break;
            case 'app-preSaleLog-Tag': coms = new ComItem(PresalesInformationComponent, tag); break;
            case 'tag.AppQuotedPriceTagLogic': coms = new ComItem(SignOfferComponent, tag); break;
            case 'app-hundredList-Tag': coms = new ComItem(ManagevideoComponent, tag); break;
            case 'copyToPasteBtn': coms = new ComItem(CopyToPasteBtnComponent, tag); break;
            case 'app-departmentIntroduction-tag': coms = new ComItem(DepartmentIntroductionComponent, tag); break;
            case 'app-departmentEmployee-tag': coms = new ComItem(DepartmentEmployeeComponent, tag); break;
            case 'businessCity': coms = new ComItem(BusinessCityComponent, tag); break;
            case 'deptManager': coms = new ComItem(DeptManagerComponent, tag); break;
            case 'employeeManager': coms = new ComItem(EmployeeManagerComponent, tag); break;
            case 'appContractListTag': coms = new ComItem(ContractListFilterComponent, tag); break;
            case 'app-currencyDetail-tag': coms = new ComItem(ContractAuditDetailComponent, tag); break;
            case 'treeTag': coms = new ComItem(ChooseDepartmentComponent, tag); break;
            case 'decorateListTag': coms = new ComItem(DecorationCompaniesComponent, tag); break;
            case 'appallAddress': coms = new ComItem(AllAddressTagComponent, tag); break;
            case 'app-successExample-tag': coms = new ComItem(SuccessInvestmentComponent, tag); break;
            case 'app-merchantList-tag': coms = new ComItem(MerchantListComponent, tag); break;
            case 'decorate_recomme_tag': coms = new ComItem(DecorateListComponent, tag); break;
            case 'appDecorationCarouselTag': coms = new ComItem(DecorationBannerComponent, tag); break;
            case 'appImageTag': coms = new ComItem(CompaniesCredentialComponent, tag); break;
            case 'publishTypeTag': coms = new ComItem(PublishSiteTypeComponent, tag); break;
            case 'appNewInfoTag': coms = new ComItem(InformationEntryComponent, tag); break;
            case 'appOperationalHelp': coms = new ComItem(OperationalHelpComponent, tag); break;
            case 'appTiptitle': coms = new ComItem(TiptitleComponent, tag); break;
            case 'fenceGridTagTag': coms = new ComItem(RecommendDatumComponent, tag); break;
            case 'appCustomerInfoTag': coms = new ComItem(RecommendClienteleComponent, tag); break;
            case 'exactClientelelistTag': coms = new ComItem(RecommendClientlistComponent, tag); break;
            case 'appDecorationPriceTags': coms = new ComItem(DecorationOffComponent, tag); break;
            case 'appOnlinePriceTags': coms = new ComItem(OnlineOffComponent, tag); break;
            case 'appRecommendClients': coms = new ComItem(RecommendDataComponent, tag); break;
            case 'searchTag': coms = new ComItem(CustomSearchBarComponent, tag); break;
            case 'appIndexMapTag': coms = new ComItem(DataMapEntryComponent, tag); break;
            case 'listValueShowTag': coms = new ComItem(ListValueShowComponent, tag); break;
            case 'tag.AppSignConTagLogic': coms = new ComItem(SigningOnComponent, tag); break;
            case 'tag.AppSignPayTagLogic': coms = new ComItem(SigningPayComponent, tag); break;
            case 'tag.CustomInfoTagLogic': coms = new ComItem(CustomerDetailsComponent, tag); break;
            case 'ServiceModuleTag': coms = new ComItem(ServiceModuleComponent, tag); break;
            case 'manage-business-service': coms = new ComItem(ManageBusinessServiceComponent, tag); break;
            case 'workspacestyle': coms = new ComItem(WorkCenterComponent, tag); break;
            case 'appListNewTag': coms = new ComItem(RegisteredListComponent, tag); break;
            case 'CaseListTag': coms = new ComItem(CaseListComponent, tag); break;
            case 'waitForToLoadTag.tag': coms = new ComItem(SpinComponent, tag); break;
            case 'tag.CustomPhoneTag': coms = new ComItem(CustomPhoneComponent, tag); break;
            case 'appMyStatisticWorkTag': coms = new ComItem(AchievementComponent, tag); break;
            case 'appMyStatisticWorkTagNew': coms = new ComItem(LaiJianAchievementComponent, tag); break;
            case 'auditsuccessListTag': coms = new ComItem(OpportunityListComponent, tag); break;
            case 'recommendRecordListTag': coms = new ComItem(RecommendRecordListComponent, tag); break;
            case 'recommendChooseTag': coms = new ComItem(RecommendChooseComponent, tag); break;
            // 推荐案例
            case 'tag.recommendChooseAll': coms = new ComItem(RecommendChooseAllComponent, tag); break;
            case 'tag.recommandQueryBtn': coms = new ComItem(RecommandQueryComponent, tag); break;
            case 'businessOptTag': coms = new ComItem(PresalesBusinessOptComponent, tag); break;
            case 'acceptRecommTag': coms = new ComItem(AcceptRecommendComponent, tag); break;
            case 'informationCardTag': coms = new ComItem(InformationCardComponent, tag); break;
            case 'recommandByCustomer': coms = new ComItem(RecommandByCustomerComponent, tag); break;
            case 'recommendDetailTag': coms = new ComItem(RecommendDetailComponent, tag); break;
            case 'recommandInfoBothTag': coms = new ComItem(RecommandInfoComponent, tag); break;
            case 'caserecommedlistTag': coms = new ComItem(CaseRecommedListComponent, tag); break;
            case 'appGeneralListTag': coms = new ComItem(AppGeneralListComponent, tag); break;
            case 'appLjGeneralListTag': coms = new ComItem(AppGeneralListLjComponent, tag); break;
            case 'RecommendInformationListComponent': coms = new ComItem(RecommendInformationListComponent, tag); break;
            case 'communicateIndexTag': coms = new ComItem(StatisticsCustomerIntentionComponent, tag); break;
            case 'otherservice-style': coms = new ComItem(OtherServiceListComponent, tag); break;
            case 'generalHeadDivTag': coms = new ComItem(GeneralHeadCountShopComponent, tag); break;
            case 'recommendService': coms = new ComItem(RecommendServiceListComponent, tag); break;
            case 'mobileCheckTag': coms = new ComItem(MobilePhoneVerificationComponent, tag); break;
            case 'adviserInfo': coms = new ComItem(AdviserInfoComponent, tag); break;
            // 物流信息
            case 'technologicalProcessTag': coms = new ComItem(LogisticsInfoComponent, tag); break;
            // 物流信息 可读表
            case 'logisticsInfoListTag': coms = new ComItem(LogisticsInfoListComponent, tag); break;
            case 'refundDestinationTag': coms = new ComItem(RefundDestinationComponent, tag); break;
            case 'indexHeadTag': coms = new ComItem(RecommendTotalComponent, tag); break;
            case 'headerTotalTag': coms = new ComItem(PerformanceDetailHeaderComponent, tag); break;
            case 'tag.headerTotalTag': coms = new ComItem(PerformanceDetailHeaderComponent, tag); break;
            case 'tag.listTotalTag': coms = new ComItem(PerformanceDetailListComponent, tag); break;
            case 'my-bicon-links-style': coms = new ComItem(MyBiconLinksStyleComponent, tag); break;
            case 'signatureTag': coms = new ComItem(PersonSignComponent, tag); break;
            case 'appMyAchieveTag': coms = new ComItem(PerformanceTotalComponent, tag); break;
            case 'two-link-style': coms = new ComItem(TwoLinkStyleComponent, tag); break;
            case 'appShareInfoTag': coms = new ComItem(PosterSharingComponent, tag); break;
            case 'applyHomeTag': coms = new ComItem(ApplyToOpenShopComponent, tag); break;
            case 'laijianLoginTag': coms = new ComItem(LaijianLoginTagComponent, tag); break;
            case 'shopPosterInfoTag': coms = new ComItem(LaijianShopPosterinfoComponent, tag); break;
            case 'recommandBanner': coms = new ComItem(RecommandBannerComponent, tag); break;
            case 'simpleTipsTag': coms = new ComItem(SimpleTipsTagComponent, tag); break;
            case 'simpleIconTipsTag': coms = new ComItem(SimpleIconTipsTagComponent, tag); break;
            case 'newIndexHeadTag': coms = new ComItem(NewIndexHeadTagComponent, tag); break;
            case 'imagsListTag': coms = new ComItem(VerticalImageListComponent, tag); break;
            case 'appInviteMsgTag': this.openMemberForInvitationModal(tag); break;
            case 'appMessageListTag': coms = new ComItem(FengWoMessageComponent, tag); break;
            case 'ljManageListTag': coms = new ComItem(ApplicationAdminListComponent, tag); break;
            case 'ljManageUserListTag': coms = new ComItem(AdminUserListComponent, tag); break;
            case 'counselorChooseListTag': coms = new ComItem(AdminOppUserListComponent, tag); break;
            case 'fwAuditListTag': coms = new ComItem(InfoAuditListComponent, tag); break;
            case 'auditListTag': coms = new ComItem(AuditListComponent, tag); break;
            case 'auditSubmitChooseTag': coms = new ComItem(AuditSubmitChooseComponent, tag); break;
            case 'singleManageListTag': coms = new ComItem(SingleManageListComponent, tag); break;
            case 'appCardListTag': coms = new ComItem(CardListTagComponent, tag); break;
            case 'employeListTag': coms = new ComItem(EmployeListComponent, tag); break;
            case 'paramListTag': coms = new ComItem(ParamListComponent, tag); break;
            case 'recommendConsultantTag': coms = new ComItem(RecommendConsultantComponent, tag); break;
            case 'commentsListTag': coms = new ComItem(CommentsListComponent, tag); break;
            case 'company-info-style': coms = new ComItem(CompanyInfoComponent, tag); break;
            case 'appStatusDivTag': coms = new ComItem(ServiceStatusComponent, tag); break;
            // 案例管理 平台案例列表 添加案例列表
            case 'appLjCaseListTag': coms = new ComItem(HouseCaseManagementComponent, tag); break;
            case 'info-company-style': coms = new ComItem(InfoCompanyStyleComponent, tag); break;
            case 'filter-upAndDown-style': coms = new ComItem(SwitchBlockButtonComponent, tag); break;
            case 'oneCss': coms = new ComItem(SwitchBlockButtonComponent, tag); break;
            case 'newStyle': coms = new ComItem(SwitchBlockButtonComponent, tag); break;
            case 'twoCss': coms = new ComItem(SwitchBlockButtonComponent, tag); break;
            case 'threeCss': coms = new ComItem(SwitchBlockButtonComponent, tag); break;
            case 'fourthCss': coms = new ComItem(SwitchBlockButtonComponent, tag); break;
            case 'slide-location-appSimpleIconTag': coms = new ComItem(SlideLocationComponent, tag); break;
            case 'myApplyListTag': coms = new ComItem(MyApplyListComponent, tag); break;
            case 'withdrawaList': coms = new ComItem(OrderListComponent, tag); break; // orderListTag
            case 'myShopCarListTag': coms = new ComItem(ShoppingCarComponent, tag); break;
            // 修改客户订单
            case 'update_customer_order_list': coms = new ComItem(ModifyCustomerOrderComponent, tag); break;
            case 'performanceInfoTag': coms = new ComItem(PerformanceInfoListComponent, tag); break;
            case 'sendSingleTag': coms = new ComItem(SendSingleComponent, tag); break;
            case 'orderInfoListTag': coms = new ComItem(OrderInfoListComponent, tag); break;
            case 'orderListTag': coms = new ComItem(OrderListStyle2Component, tag); break;
            case 'orderTimeFilterTag': coms = new ComItem(OrderTimeFilterComponent, tag); break;
            case 'addressManageListTag': coms = new ComItem(AddressListComponent, tag); break;
            case 'invoiceListTag': coms = new ComItem(InvoiceListComponent, tag); break;
            case 'invoiceHeadListTag': coms = new ComItem(InvoiceHeadListComponent, tag); break;
            case 'serviceCaseListTag': coms = new ComItem(ServiceCaseListComponent, tag); break;
            case 'worksList': coms = new ComItem(WorksListComponent, tag); break;
            case 'designsRecordListTag': coms = new ComItem(DesignsRecordListComponent, tag); break;
            case 'designsDataListTag': coms = new ComItem(DesignsDataListComponent, tag); break;
            case 'chooseSpecificTag': coms = new ComItem(SelectSpecificationsComponent, tag); break;
            case 'decorateInfoListTag': coms = new ComItem(DecorateInfoListComponent, tag); break;
            case 'appServiceListTag': coms = new ComItem(ServiceListComponent, tag); break;
            case 'transverse-list': coms = new ComItem(TransverseListComponent, tag); break;
            case 'tag.LoginTagLogic': coms = new ComItem(LoginComponent, tag); break;
            case 'appAddressListTag': coms = new ComItem(ShopAddressListComponent, tag); break;
            case 'appFormTag-link': coms = new ComItem(ClassificationComponent, tag); break;
            case 'seckill-title': coms = new ComItem(SecondKillContentComponent, tag); break;
            case 'appComboListTag': coms = new ComItem(AppComboListComponent, tag); break;
            case 'appSeckillListTag': coms = new ComItem(SecondKillListComponent, tag); break;
            case 'clean-page': coms = new ComItem(CleanPageComponent, tag); break;
            case 'filter-transverse-tag': coms = new ComItem(FilterTransverseTagComponent, tag); break;
            case 'FreeCollectionOfDesign': coms = new ComItem(FreeCollectionOfDesignComponent, tag); break;
            // AI设计列表（分页） + 效果图生成列表（单条）
            case 'appPlanDesignTag-list': coms = new ComItem(AiDesignListComponent, tag); break;
            // 户型图一居室两居室嵌套列表
            case 'house-transverse-list': coms = new ComItem(HouseTransverseListComponent, tag); break;
            // 户型图放大后查看
            case 'house-show': coms = new ComItem(HouseShowImageComponent, tag); break;
            // 户型搜索-智能生成-选择设计模式
            case 'design-pattern': coms = new ComItem(DesignPatternComponent, tag); break;
            // 我的 -设计 DIY列表
            case 'my-diy-list': coms = new ComItem(MyDiyListComponent, tag); break;
            // 通过手机号码登录
            case 'mobileLogin': coms = new ComItem(OneClickLoginComponent, tag); break;
            // 通过账号密码登录 与后台联调只能使用新的标签因为绑定了事件
            case 'accAndPwdLogin': coms = new ComItem(OneClickLoginComponent, tag); break;
            case 'aiSearchHeaderTag': coms = new ComItem(AiSearchHeaderTagComponent, tag); break;
            case 'listOfHousePlans': coms = new ComItem(ListOfHousePlansComponent, tag); break;
            // 入驻相关，分享使用APP的H5 [1.底部入驻按钮 2.我的tab里面加入我们]
            case 'imageLinkBtn': coms = new ComItem(ImgLinkBtnComponent, tag); break;
            case 'shop-honor-icon-manage': coms = new ComItem(ShopHonorManageComponent, tag); break;
            // 蜂喔赚钱宝1.7.0 当前店铺完整度
            case 'shop-info-Integrity': coms = new ComItem(ShopInfoIntegrityComponent, tag); break;
            // 蜂喔赚钱宝1.7.0 指纹校验
            case 'appSimpleIconTag': coms = new ComItem(FingerPrintAuthComponent, tag); break;
            // 蜂喔赚钱宝1.7.0 商品管理列表
            case 'shopGoodsManageList': coms = new ComItem(ShopGoodsManageListComponent, tag); break;
            case 'videos': coms = new ComItem(VideosComponent, tag); break;
            case 'appCustomPriceTag': coms = new ComItem(CustomPriceComponent, tag); break;
            // 蜂喔赚钱宝1.7.0 商品管理列表
            case 'search-style': coms = new ComItem(StoreConsultantComponent, tag); break;
            case 'appCaseTopListTag': coms = new ComItem(CaseTopListComponent, tag); break;
            case 'appShoppingListTag': coms = new ComItem(DailyCleanListComponent, tag); break;
            case 'quotedPriceListTag': coms = new ComItem(QuotedPriceListComponent, tag); break;
            case 'appStatisticSalesTag': coms = new ComItem(StatisticSalesComponent, tag); break;
            case 'appComputeReportTag': coms = new ComItem(ComputeReportComponent, tag); break;
            case 'performanceDetailsChartTag': coms = new ComItem(PerformanceDetailsChartComponent, tag); break;
            case 'appDiscountsListTag': coms = new ComItem(NewCardListTagComponent, tag); break;
            case 'dynamicDetailsTag': coms = new ComItem(DynamicDetailsComponent, tag); break;
            case 'sendLabeTag': coms = new ComItem(SendLabeComponent, tag); break;
            case 'tag.dynamicDetailsTag': coms = new ComItem(DynamicDetailsFootComponent, tag); break;
            case 'designatedOrderReceiverList': coms = new ComItem(DesignatedOrderReceiverComponent, tag); break;
            case 'tag.ChangeAddressTagLogic': coms = new ComItem(NewChooseCityComponent, tag); break;
            case 'businessAppSimpleIconTag': coms = new ComItem(BusinessOrderComponent, tag); break;
            case 'nearbyStoresListTag': coms = new ComItem(NearbyStoresListComponent, tag); break;
            case 'certificateListTag': coms = new ComItem(CertificateListComponent, tag); break;
            case 'expressPath': coms = new ComItem(LogisticsTrajectoryComponent, tag); break;
            case 'foldListTag': coms = new ComItem(FoldListComponent, tag); break;
            case 'videoDetailsTag': coms = new ComItem(videoCommentsDetailsComponent, tag); break;
            case 'tag.videoDetailsTag': coms = new ComItem(VideoCommentsFootComponent, tag); break;

            default: {
                // // 特殊标签 tipsDivTag  返回的时候提示框用
                // if (style === 'tipsDivTag') {
                //     this.appGlobalService.tipsDiv = tag.data.tipsDiv ? tag.data.tipsDiv : undefined ;
                //     if (this.appGlobalService.tipsDiv) {
                //         this.totalCount();
                //     }
                // } else
                {
                    // coms = new ComItem(PerformanceDetailListComponent, tag); break;
                    console.log('新标签：' + style + '未添加!!!\n');
                }
                break;
            }
        }
        // 暂时只支持tab part 返回的只有一个 footer的情况
        if (isPart && tag && tag.linearLayout === 'footer') {
            this.eventService.eventEmit.emit('addFooterCom', coms);
        } else if (isPart) {
            this.eventService.eventEmit.emit('addFooterCom', null);
        } else {
            callback(coms);
        }

    }

    async openMemberForInvitationModal(tag) {
        try {
            if (tag && tag.data.head && tag.data.head.length > 0) {
                const modal = await this.modalController.create({
                    showBackdrop: true,
                    cssClass: 'custom-popover',
                    animated: false,
                    component: OpenMemberInvitationModalComponent,
                    componentProps: { tagData: tag }
                });
                await modal.present();
                const modalData = await modal.onDidDismiss(); // 获取关闭传回的值
            }
        } catch (error) {
            console.log('error----->' + JSON.stringify(error));
        }
    }


    totalCount() {

        switch (this.appGlobalService.tipsDiv.plugin_id) {
            case '1':
                this.appGlobalService.tipsTotalCount.plugin_id1 += 1;
                break;
            case '2':
                this.appGlobalService.tipsTotalCount.plugin_id2 += 1;
                break;
            case '3':
                this.appGlobalService.tipsTotalCount.plugin_id3 += 1;
                break;
            case '4':
                this.appGlobalService.tipsTotalCount.plugin_id4 += 1;
                break;
            case '5':
                this.appGlobalService.tipsTotalCount.plugin_id5 += 1;
                break;
            case '6':
                this.appGlobalService.tipsTotalCount.plugin_id6 += 1;
                break;
            case '7':
                this.appGlobalService.tipsTotalCount.plugin_id7 += 1;
                break;
            case '8':
                this.appGlobalService.tipsTotalCount.plugin_id8 += 1;
                break;
            case '9':
                this.appGlobalService.tipsTotalCount.plugin_id9 += 1;
                break;
            case '10':
                this.appGlobalService.tipsTotalCount.plugin_id10 += 1;
                break;
            case '11':
                this.appGlobalService.tipsTotalCount.plugin_id11 += 1;
                break;
            case '12':
                this.appGlobalService.tipsTotalCount.plugin_id12 += 1;
                break;
            case '13':
                this.appGlobalService.tipsTotalCount.plugin_id13 += 1;
                break;
            case '14':
                this.appGlobalService.tipsTotalCount.plugin_id14 += 1;
                break;
            case '15':
                this.appGlobalService.tipsTotalCount.plugin_id15 += 1;
                break;
            case '16':
                this.appGlobalService.tipsTotalCount.plugin_id16 += 1;
                break;
            case '17':
                this.appGlobalService.tipsTotalCount.plugin_id17 += 1;
                break;
            case '18':
                this.appGlobalService.tipsTotalCount.plugin_id18 += 1;
                break;
            case '19':
                this.appGlobalService.tipsTotalCount.plugin_id19 += 1;
                break;
            case '20':
                this.appGlobalService.tipsTotalCount.plugin_id20 += 1;
                break;
            case '21':
                this.appGlobalService.tipsTotalCount.plugin_id21 += 1;
                break;
            case '22':
                this.appGlobalService.tipsTotalCount.plugin_id22 += 1;
                break;
            case '23':
                this.appGlobalService.tipsTotalCount.plugin_id23 += 1;
                break;
            case '24':
                this.appGlobalService.tipsTotalCount.plugin_id24 += 1;
                break;
            case '25':
                this.appGlobalService.tipsTotalCount.plugin_id25 += 1;
                break;
            case '26':
                this.appGlobalService.tipsTotalCount.plugin_id26 += 1;
                break;
            case '27':
                this.appGlobalService.tipsTotalCount.plugin_id27 += 1;
                break;
            case '28':
                this.appGlobalService.tipsTotalCount.plugin_id28 += 1;
                break;
            case '29':
                this.appGlobalService.tipsTotalCount.plugin_id29 += 1;
                break;
            case '30':
                this.appGlobalService.tipsTotalCount.plugin_id30 += 1;
                break;
            case '31':
                this.appGlobalService.tipsTotalCount.plugin_id31 += 1;
                break;
            case '32':
                this.appGlobalService.tipsTotalCount.plugin_id32 += 1;
                break;
            case '33':
                this.appGlobalService.tipsTotalCount.plugin_id33 += 1;
                break;
            case '34':
                this.appGlobalService.tipsTotalCount.plugin_id34 += 1;
                break;
            case '35':
                this.appGlobalService.tipsTotalCount.plugin_id35 += 1;
                break;
            case '36':
                this.appGlobalService.tipsTotalCount.plugin_id36 += 1;
                break;
            case '37':
                this.appGlobalService.tipsTotalCount.plugin_id37 += 1;
                break;
            case '38':
                this.appGlobalService.tipsTotalCount.plugin_id38 += 1;
                break;
            case '100':
                this.appGlobalService.tipsTotalCount.plugin_id100 += 1;
                break;
            default:
                break;
        }
    }

    alertDivTotalCount() {

        switch (this.appGlobalService.alertDiv.plugin_id) {
            case '1':
                this.appGlobalService.alertDivTotalCount.plugin_id1 += 1;
                break;
            case '2':
                this.appGlobalService.alertDivTotalCount.plugin_id2 += 1;
                break;
            case '3':
                this.appGlobalService.alertDivTotalCount.plugin_id3 += 1;
                break;
            case '4':
                this.appGlobalService.alertDivTotalCount.plugin_id4 += 1;
                break;
            case '5':
                this.appGlobalService.alertDivTotalCount.plugin_id5 += 1;
                break;
            case '6':
                this.appGlobalService.alertDivTotalCount.plugin_id6 += 1;
                break;
            case '7':
                this.appGlobalService.alertDivTotalCount.plugin_id7 += 1;
                break;
            case '8':
                this.appGlobalService.alertDivTotalCount.plugin_id8 += 1;
                break;
            case '9':
                this.appGlobalService.alertDivTotalCount.plugin_id9 += 1;
                break;
            case '10':
                this.appGlobalService.alertDivTotalCount.plugin_id10 += 1;
                break;
            case '11':
                this.appGlobalService.alertDivTotalCount.plugin_id11 += 1;
                break;
            case '12':
                this.appGlobalService.alertDivTotalCount.plugin_id12 += 1;
                break;
            case '13':
                this.appGlobalService.alertDivTotalCount.plugin_id13 += 1;
                break;
            case '14':
                this.appGlobalService.alertDivTotalCount.plugin_id14 += 1;
                break;
            case '15':
                this.appGlobalService.alertDivTotalCount.plugin_id15 += 1;
                break;
            case '16':
                this.appGlobalService.alertDivTotalCount.plugin_id16 += 1;
                break;
            case '17':
                this.appGlobalService.alertDivTotalCount.plugin_id17 += 1;
                break;
            case '18':
                this.appGlobalService.alertDivTotalCount.plugin_id18 += 1;
                break;
            case '19':
                this.appGlobalService.alertDivTotalCount.plugin_id19 += 1;
                break;
            case '20':
                this.appGlobalService.alertDivTotalCount.plugin_id20 += 1;
                break;
            case '21':
                this.appGlobalService.alertDivTotalCount.plugin_id21 += 1;
                break;
            case '22':
                this.appGlobalService.alertDivTotalCount.plugin_id22 += 1;
                break;
            case '23':
                this.appGlobalService.alertDivTotalCount.plugin_id23 += 1;
                break;
            case '24':
                this.appGlobalService.alertDivTotalCount.plugin_id24 += 1;
                break;
            case '25':
                this.appGlobalService.alertDivTotalCount.plugin_id25 += 1;
                break;
            case '26':
                this.appGlobalService.alertDivTotalCount.plugin_id26 += 1;
                break;
            case '27':
                this.appGlobalService.alertDivTotalCount.plugin_id27 += 1;
                break;
            case '28':
                this.appGlobalService.alertDivTotalCount.plugin_id28 += 1;
                break;
            case '29':
                this.appGlobalService.alertDivTotalCount.plugin_id29 += 1;
                break;
            case '30':
                this.appGlobalService.alertDivTotalCount.plugin_id30 += 1;
                break;
            case '31':
                this.appGlobalService.alertDivTotalCount.plugin_id31 += 1;
                break;
            case '32':
                this.appGlobalService.alertDivTotalCount.plugin_id32 += 1;
                break;
            case '33':
                this.appGlobalService.alertDivTotalCount.plugin_id33 += 1;
                break;
            case '34':
                this.appGlobalService.alertDivTotalCount.plugin_id34 += 1;
                break;
            case '35':
                this.appGlobalService.alertDivTotalCount.plugin_id35 += 1;
                break;
            case '36':
                this.appGlobalService.alertDivTotalCount.plugin_id36 += 1;
                break;
            case '37':
                this.appGlobalService.alertDivTotalCount.plugin_id37 += 1;
                break;
            case '38':
                this.appGlobalService.alertDivTotalCount.plugin_id38 += 1;
                break;
            case '100':
                this.appGlobalService.alertDivTotalCount.plugin_id100 += 1;
                break;
            default:
                break;
        }
    }
    async getPageDataWithBuffer(res, callback: Function) {
        const headerContainer = [];
        const comContainer = [];
        const pageData = res;
        const footerContainer = [];
        const tags = pageData.views === undefined ? pageData.tags : pageData.views[0].tags;
        let isPullToRefresh = null;
        if (pageData.isPullToRefresh !== undefined) {
            if (pageData.isPullToRefresh) {
                isPullToRefresh = 1;
            } else {
                isPullToRefresh = 0;
            }
        }
        await this.controllerTagToContainer(headerContainer, comContainer, footerContainer, tags, undefined, isPullToRefresh);
        this.coms = comContainer;
        // this.headerComs = headerContainer;
        this.footerComs = footerContainer;
        this.pageData = {
            coms: this.coms,
            footerComs: this.footerComs,
            headerCom: this.headerComs,
            isGrayBg: pageData.isGrayBg
        };
        callback(this.pageData);
    }
    pushTagToContainer(comContainer: any, style: any, tag: any, searchInputParams?) {
        this.getComsDataByStyle(style, data => {
            if (data) {
                comContainer.push(data);
            }
        }, tag, searchInputParams);
    }
}


